ruby-changes:46871
From: nobu <ko1@a...>
Date: Thu, 1 Jun 2017 21:58:10 +0900 (JST)
Subject: [ruby-changes:46871] nobu:r58986 (trunk): file.c: rb_check_funcall_default for fallback value
nobu 2017-06-01 21:58:02 +0900 (Thu, 01 Jun 2017) New Revision: 58986 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58986 Log: file.c: rb_check_funcall_default for fallback value Modified files: trunk/file.c Index: file.c =================================================================== --- file.c (revision 58985) +++ file.c (revision 58986) @@ -179,10 +179,7 @@ rb_get_path_check_to_string(VALUE obj, i https://github.com/ruby/ruby/blob/trunk/file.c#L179 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/