ruby-changes:42454
From: nobu <ko1@a...>
Date: Sun, 10 Apr 2016 16:51:07 +0900 (JST)
Subject: [ruby-changes:42454] nobu:r54528 (trunk): no argument conversions in rb_realpath_internal
nobu 2016-04-10 17:47:44 +0900 (Sun, 10 Apr 2016) New Revision: 54528 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=54528 Log: no argument conversions in rb_realpath_internal * file.c (rb_realpath_internal): no argument conversions since this internal function does not need to_path and encoding conversions, not to be affected by the default internal encoding. Modified files: trunk/ChangeLog trunk/file.c Index: file.c =================================================================== --- file.c (revision 54527) +++ file.c (revision 54528) @@ -3828,7 +3828,6 @@ rb_realpath_internal(VALUE basedir, VALU https://github.com/ruby/ruby/blob/trunk/file.c#L3828 char *ptr, *prefixptr = NULL, *pend; long len; - FilePathValue(path); unresolved_path = rb_str_dup_frozen(path); if (!NIL_P(basedir)) { @@ -3915,6 +3914,7 @@ rb_file_s_realpath(int argc, VALUE *argv https://github.com/ruby/ruby/blob/trunk/file.c#L3914 { VALUE path, basedir; rb_scan_args(argc, argv, "11", &path, &basedir); + FilePathValue(path); return rb_realpath_internal(basedir, path, 1); } @@ -3935,6 +3935,7 @@ rb_file_s_realdirpath(int argc, VALUE *a https://github.com/ruby/ruby/blob/trunk/file.c#L3935 { VALUE path, basedir; rb_scan_args(argc, argv, "11", &path, &basedir); + FilePathValue(path); return rb_realpath_internal(basedir, path, 0); } Index: ChangeLog =================================================================== --- ChangeLog (revision 54527) +++ ChangeLog (revision 54528) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Apr 10 17:47:42 2016 Nobuyoshi Nakada <nobu@r...> + + * file.c (rb_realpath_internal): no argument conversions since + this internal function does not need to_path and encoding + conversions, not to be affected by the default internal + encoding. + Sat Apr 9 10:03:12 2016 Nobuyoshi Nakada <nobu@r...> * load.c (rb_f_load): raise with the original path name before -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/