aboutsummaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 16:02:34 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-27 16:02:34 +0000
commit45add937f0fe3637fb48403e6990e0eb5322d5ee (patch)
treec92ea58175ec5f1d4efad17cebe45f334f8c2ba2 /template
parent1bd40a61900d166126b6b6dbe7c06449207d456e (diff)
downloadruby-45add937f0fe3637fb48403e6990e0eb5322d5ee.tar.gz
Revert "Manage AST NODEs out of GC"
This reverts commit 620ba74778bfdbdc34ffbb142d49ce84a0ef58e9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/prelude.c.tmpl10
1 files changed, 3 insertions, 7 deletions
diff --git a/template/prelude.c.tmpl b/template/prelude.c.tmpl
index b791c14ae4..873146fc39 100644
--- a/template/prelude.c.tmpl
+++ b/template/prelude.c.tmpl
@@ -121,14 +121,10 @@ prelude_eval(VALUE code, VALUE name, int line)
FALSE, /* int debug_frozen_string_literal; */
};
- ast_t *ast = rb_parser_compile_string_path(rb_parser_new(), name, code, line);
- if (!ast->root) {
- rb_ast_dispose(ast);
- rb_exc_raise(rb_errinfo());
- }
- rb_iseq_eval(rb_iseq_new_with_opt(ast->root, name, name, Qnil, INT2FIX(line),
+ NODE *node = rb_parser_compile_string_path(rb_parser_new(), name, code, line);
+ if (!node) rb_exc_raise(rb_errinfo());
+ rb_iseq_eval(rb_iseq_new_with_opt(node, name, name, Qnil, INT2FIX(line),
NULL, ISEQ_TYPE_TOP, &optimization));
- rb_ast_dispose(ast);
}
% end