summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-10-04 01:48:31 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-10-04 02:30:36 +0900
commitb43afa0a8f82a5d806adc24afa2eaf41479da1a3 (patch)
treeb62d5698e738b2dcf16ecb7b91d7b7c7b1dae426 /iseq.c
parent711c40ebdcd0974ef3e6ac6870412dc88ae25f3e (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2519
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c2
1 files changed, 1 insertions, 1 deletions
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);
}