summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 231fab6a77..991337fa91 100644
--- a/compile.c
+++ b/compile.c
@@ -5653,9 +5653,12 @@ iseq_compile_each0(rb_iseq_t *iseq, LINK_ANCHOR *const ret, NODE *node, int popp
enum iseq_type parent_type;
if (type == ISEQ_TYPE_TOP || type == ISEQ_TYPE_MAIN) {
+ LABEL *splabel = NEW_LABEL(line);
+ ADD_LABEL(ret, splabel);
ADD_ADJUST(ret, line, 0);
ADD_INSN(ret, line, putnil);
ADD_INSN(ret, line, leave);
+ ADD_ADJUST_RESTORE(ret, splabel);
}
else if ((type == ISEQ_TYPE_RESCUE || type == ISEQ_TYPE_ENSURE) &&
parent_iseq &&