summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorwanabe <s.wanabe@gmail.com>2020-08-08 22:34:08 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-08-16 18:39:08 +0900
commitc866d6563f2295d12225addc2e4f8edb677c4e2d (patch)
treefe4c66f343e2842ed53bfba89f8bf75244ffa45f /compile.c
parentd5940784263e60140fa15e8ca5ed4d33197cd255 (diff)
Adjust sp for `case ... in v1 ... in v2 end`
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3403
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 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);