From b43afa0a8f82a5d806adc24afa2eaf41479da1a3 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Fri, 4 Oct 2019 01:48:31 +0900 Subject: Make parser_params have parent_iseq instead of base_block The parser needs to determine whether a local varaiable is defined or not in outer scope. For the sake, "base_block" field has kept the outer block. However, the whole block was actually unneeded; the parser used only base_block->iseq. So, this change lets parser_params have the iseq directly, instead of the whole block. --- iseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iseq.c') diff --git a/iseq.c b/iseq.c index ae7b1cc30a..d7e8cce821 100644 --- a/iseq.c +++ b/iseq.c @@ -994,7 +994,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c } { const VALUE parser = rb_parser_new(); - rb_parser_set_context(parser, base_block, FALSE); + rb_parser_set_context(parser, parent, FALSE); ast = (*parse)(parser, file, src, ln); } -- cgit v1.2.3