diff options
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -708,7 +708,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c ast = (*parse)(parser, file, src, ln); } - if (!ast->root) { + if (!ast->body.root) { rb_ast_dispose(ast); rb_exc_raise(GET_EC()->errinfo); } @@ -716,7 +716,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c INITIALIZED VALUE label = parent ? parent->body->location.label : rb_fstring_cstr("<compiled>"); - iseq = rb_iseq_new_with_opt(ast->root, label, file, realpath, line, + iseq = rb_iseq_new_with_opt(ast->body.root, label, file, realpath, line, parent, type, &option); rb_ast_dispose(ast); } @@ -927,17 +927,17 @@ 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)); - if (!ast->root) exc = GET_EC()->errinfo; + if (!ast->body.root) exc = GET_EC()->errinfo; rb_io_close(f); - if (!ast->root) { + if (!ast->body.root) { rb_ast_dispose(ast); rb_exc_raise(exc); } make_compile_option(&option, opt); - ret = iseqw_new(rb_iseq_new_with_opt(ast->root, rb_fstring_cstr("<main>"), + ret = iseqw_new(rb_iseq_new_with_opt(ast->body.root, rb_fstring_cstr("<main>"), file, rb_realpath_internal(Qnil, file, 1), line, NULL, ISEQ_TYPE_TOP, &option)); |