summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm_eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 469b89c03a..b326f2a09c 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -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