aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c3
1 files changed, 2 insertions, 1 deletions
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);
}