diff --git a/compile.c b/compile.c index e102dc8daf..dbdb4b9127 100644 --- a/compile.c +++ b/compile.c @@ -6344,6 +6344,9 @@ compile_case3(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const orig_no while (type == NODE_IN) { LABEL *l1; + if (branch_id) { + ADD_INSN(body_seq, line, putnil); + } l1 = NEW_LABEL(line); ADD_LABEL(body_seq, l1); ADD_INSN(body_seq, line, pop);