diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-10-04 01:48:31 +0900 |
---|---|---|
committer | Yusuke Endoh <mame@ruby-lang.org> | 2019-10-04 02:30:36 +0900 |
commit | b43afa0a8f82a5d806adc24afa2eaf41479da1a3 (patch) | |
tree | b62d5698e738b2dcf16ecb7b91d7b7c7b1dae426 /vm_eval.c | |
parent | 711c40ebdcd0974ef3e6ac6870412dc88ae25f3e (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 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1579,7 +1579,7 @@ eval_make_iseq(VALUE src, VALUE fname, int line, const rb_binding_t *bind, fname = rb_fstring_lit("(eval)"); } - rb_parser_set_context(parser, base_block, FALSE); + rb_parser_set_context(parser, parent, FALSE); ast = rb_parser_compile_string_path(parser, fname, src, line); if (ast->body.root) { iseq = rb_iseq_new_with_opt(&ast->body, |