summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'load.c')
-rw-r--r--load.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/load.c b/load.c
index 8b12c4d64c..db09c3384e 100644
--- a/load.c
+++ b/load.c
@@ -602,7 +602,7 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
EC_PUSH_TAG(th->ec);
state = EXEC_TAG();
if (state == TAG_NONE) {
- ast_t *ast;
+ NODE *node;
const rb_iseq_t *iseq;
if ((iseq = rb_iseq_load_iseq(fname)) != NULL) {
@@ -611,10 +611,9 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap)
else {
VALUE parser = rb_parser_new();
rb_parser_set_context(parser, NULL, FALSE);
- ast = (ast_t *)rb_parser_load_file(parser, fname);
- iseq = rb_iseq_new_top(ast->root, rb_fstring_cstr("<top (required)>"),
+ node = (NODE *)rb_parser_load_file(parser, fname);
+ iseq = rb_iseq_new_top(node, rb_fstring_cstr("<top (required)>"),
fname, rb_realpath_internal(Qnil, fname, 1), NULL);
- rb_ast_dispose(ast);
}
rb_iseq_eval(iseq);
}