aboutsummaryrefslogtreecommitdiffstats
path: root/ast.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-09 13:39:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-09 13:39:36 +0000
commit4bf84ede2013a69dba2b89080211e9aa59a533d5 (patch)
treec364eb949afc18837c800a1e636b5fe7967bb3f8 /ast.c
parent49c7c8ed85cfeaae98fbfb1828424e1e5bb9b0dc (diff)
downloadruby-4bf84ede2013a69dba2b89080211e9aa59a533d5.tar.gz
Get rid of setting SCRIPT_LINES__ by AST.parse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ast.c b/ast.c
index 3d09756225..4e2f05c2b7 100644
--- a/ast.c
+++ b/ast.c
@@ -83,7 +83,7 @@ rb_ast_parse_str(VALUE str)
str = rb_check_string_type(str);
rb_parser_set_context(parser, NULL, 0);
- ast = rb_parser_compile_string_path(parser, rb_str_new_cstr("no file name"), str, 1);
+ ast = rb_parser_compile_string_path(parser, Qnil, str, 1);
if (!ast->body.root) {
rb_ast_dispose(ast);
@@ -127,7 +127,7 @@ rb_ast_parse_file(VALUE path)
f = rb_file_open_str(path, "r");
rb_funcall(f, rb_intern("set_encoding"), 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
rb_parser_set_context(parser, NULL, 0);
- ast = rb_parser_compile_file_path(parser, path, f, 1);
+ ast = rb_parser_compile_file_path(parser, Qnil, f, 1);
rb_io_close(f);