From 802e5677a4f285bf90df78f8998a5f0cfea2fbc6 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 27 Sep 2016 05:34:41 +0000 Subject: 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 --- iseq.c | 4 +--- 1 file changed, 1 insertion(+), 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); -- cgit v1.2.3