diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-01 12:58:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-01 12:58:02 +0000 |
commit | f800e764dcb60935a5faf29eaf280aff5d689ed5 (patch) | |
tree | 114e1e53af6a54de8674b2aa71baacd402991bc7 | |
parent | 035656ba5b94354b8a48b7d84fd81de4696a1a56 (diff) | |
download | ruby-f800e764dcb60935a5faf29eaf280aff5d689ed5.tar.gz |
file.c: rb_check_funcall_default for fallback value
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | file.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -179,10 +179,7 @@ rb_get_path_check_to_string(VALUE obj, int level) return obj; } CONST_ID(to_path, "to_path"); - tmp = rb_check_funcall(obj, to_path, 0, 0); - if (tmp == Qundef) { - tmp = obj; - } + tmp = rb_check_funcall_default(obj, to_path, 0, 0, obj); StringValue(tmp); return tmp; } |