diff options
author | Jeremy Evans <[email protected]> | 2020-11-18 11:39:59 -0800 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2020-11-19 07:12:50 +0900 |
commit | 4a5c42db88d30532bd4fbcdff89615ebf961d2a2 (patch) | |
tree | 8ed563a01104757d8521c300fb41ad1d52fdc5bb /iseq.c | |
parent | fee0073726655827b7b7dcd0481b2119fdbf89f5 (diff) |
Make RubyVM::InstructionSequence.compile_file use same encoding as load
This switches the internal function from rb_parser_compile_file_path
to rb_parser_load_file, which is the same internal method that
Kernel#load uses.
Fixes [Bug #17308]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3788
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1303,7 +1303,7 @@ iseqw_s_compile_file(int argc, VALUE *argv, VALUE self) parser = rb_parser_new(); rb_parser_set_context(parser, NULL, FALSE); - ast = rb_parser_compile_file_path(parser, file, f, NUM2INT(line)); + ast = (rb_ast_t *)rb_parser_load_file(parser, file); if (!ast->body.root) exc = GET_EC()->errinfo; rb_io_close(f); |