summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-24 11:15:38 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-29 11:05:41 +0900
commitbacd03ebdfdd3940084cb54ffc0c2a75b0a4e8d0 (patch)
tree5c0fab40e2b94824131f73ea5d9d68a73f32dbe9
parent2b636dc81dcc2540e0548c856ac495722fcd3959 (diff)
compile_redo: fix wrong condition
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3247
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index f641cf91ee..ccb079c5e0 100644
--- a/compile.c
+++ b/compile.c
@@ -6708,7 +6708,7 @@ compile_redo(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, in
ADD_INSN(ret, line, putnil);
}
}
- else if (iseq->body->type == ISEQ_TYPE_EVAL && ISEQ_COMPILE_DATA(iseq)->start_label) {
+ else if (iseq->body->type != ISEQ_TYPE_EVAL && ISEQ_COMPILE_DATA(iseq)->start_label) {
LABEL *splabel = NEW_LABEL(0);
debugs("redo in block");