summaryrefslogtreecommitdiff
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
commit802e5677a4f285bf90df78f8998a5f0cfea2fbc6 (patch)
treee07fa4f59f6f4aca979494bdce713b8d2cafbe6c
parenteb937455f274b34e9435d83705a4f49725d86285 (diff)
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
-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);