diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-11-04 14:57:52 -0500 |
|---|---|---|
| committer | Kevin Newton <kddnewton@gmail.com> | 2024-11-05 17:08:35 -0500 |
| commit | 4203c70dfa96649bae305350817d7cc3c9bc5888 (patch) | |
| tree | 8492282fb4ebce9c1230f19376e9635bf995d0d5 | |
| parent | 4120f2babd7924a31c6d685be2429492af5c19b9 (diff) | |
Allow eval to see top scope
Fixes [Bug #20856]
Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11993
| -rw-r--r-- | vm_eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1682,7 +1682,7 @@ pm_eval_make_iseq(VALUE src, VALUE fname, int line, int scopes_count = 0; do { scopes_count++; - } while ((iseq = ISEQ_BODY(iseq)->parent_iseq) && (ISEQ_BODY(iseq)->type != ISEQ_TYPE_TOP)); + } while ((iseq = ISEQ_BODY(iseq)->parent_iseq)); pm_options_scopes_init(&result.options, scopes_count + 1); // Walk over the scope tree, adding known locals at the correct depths. The |
