diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-10 10:42:52 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-10 10:42:52 +0000 |
commit | 4ed65f12427b34e7362ce878ac1ef1b4b4fa6bbd (patch) | |
tree | e37c22f864c5d29ea21608c2be67ac66eb87abd4 /io.c | |
parent | f194d4411ddba995c5a6ccc858a6d17f6f22807a (diff) |
io.c: path name conversion at ARGF
* io.c (argf_next_argv): the standard conversion to path name
should take place.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -136,6 +136,8 @@ off_t __syscall(quad_t number, ...); #ifdef _WIN32 #undef open #define open rb_w32_uopen +#undef rename +#define rename(f, t) rb_w32_urename((f), (t)) #endif VALUE rb_cIO; @@ -8249,8 +8251,8 @@ argf_next_argv(VALUE argf) retry: if (RARRAY_LEN(ARGF.argv) > 0) { VALUE filename = rb_ary_shift(ARGF.argv); - StringValueCStr(filename); - ARGF.filename = rb_str_encode_ospath(filename); + FilePathValue(filename); + ARGF.filename = filename; fn = StringValueCStr(filename); if (RSTRING_LEN(filename) == 1 && fn[0] == '-') { ARGF.current_file = rb_stdin; |