aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-27 05:34:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-27 05:34:41 +0000
commit99902a451b3f12ddd61dc6d8249362795f419298 (patch)
treee07fa4f59f6f4aca979494bdce713b8d2cafbe6c /iseq.c
parent5e77410451410e3ce349b10486ecbfd60b2ff98f (diff)
downloadruby-99902a451b3f12ddd61dc6d8249362795f419298.tar.gz
iseq.c: file name encoding
* iseq.c (iseqw_s_compile): keep the encoding of file name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/iseq.c b/iseq.c
index 1e4656bc62..425850bde2 100644
--- a/iseq.c
+++ b/iseq.c
@@ -817,19 +817,17 @@ iseqw_s_compile_file(int argc, VALUE *argv, VALUE self)
VALUE parser;
VALUE f;
NODE *node;
- const char *fname;
rb_compile_option_t option;
rb_secure(1);
rb_scan_args(argc, argv, "11", &file, &opt);
FilePathValue(file);
file = rb_fstring(file); /* rb_io_t->pathv gets frozen anyways */
- fname = StringValueCStr(file);
f = rb_file_open_str(file, "r");
parser = rb_parser_new();
- node = rb_parser_compile_file(parser, fname, f, NUM2INT(line));
+ node = rb_parser_compile_file_path(parser, file, f, NUM2INT(line));
rb_io_close(f);