aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-10 08:47:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-10 08:47:44 +0000
commit3cd3c9d74c8e30fc10726735165e2b8dd50bfaec (patch)
tree5fc9d359093bc5468fb7290c43a93b95da87eec5
parentee83372106ac744793b9274eea604b04c0916566 (diff)
downloadruby-3cd3c9d74c8e30fc10726735165e2b8dd50bfaec.tar.gz
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--file.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 878498f76e..371e9c5a20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun Apr 10 17:47:42 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* load.c (rb_f_load): raise with the original path name before
diff --git a/file.c b/file.c
index 2a67cdfeb8..901e46a0c2 100644
--- a/file.c
+++ b/file.c
@@ -3828,7 +3828,6 @@ rb_realpath_internal(VALUE basedir, VALUE path, int strict)
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, VALUE klass)
{
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 *argv, VALUE klass)
{
VALUE path, basedir;
rb_scan_args(argc, argv, "11", &path, &basedir);
+ FilePathValue(path);
return rb_realpath_internal(basedir, path, 0);
}