aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorwanabe <s.wanabe@gmail.com>2020-08-08 22:27:07 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2020-08-16 18:39:08 +0900
commitd5940784263e60140fa15e8ca5ed4d33197cd255 (patch)
tree6a687a43cae89ef7c8fd57dff1067ea78a6791c7 /compile.c
parent2bbb7c3d1f2dc001354f6d58bf27c7796ea5f17e (diff)
downloadruby-d5940784263e60140fa15e8ca5ed4d33197cd255.tar.gz
Adjust sp for `case ... in v1, v2 ... end`
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 1303a10b64..e102dc8daf 100644
--- a/compile.c
+++ b/compile.c
@@ -5770,12 +5770,14 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c
ADD_INSN(ret, line, pop);
}
ADD_INSNL(ret, line, jump, matched);
+ ADD_INSN(ret, line, putnil);
ADD_LABEL(ret, type_error);
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE));
ADD_INSN1(ret, line, putobject, rb_eTypeError);
ADD_INSN1(ret, line, putobject, rb_fstring_lit("deconstruct must return Array"));
ADD_SEND(ret, line, id_core_raise, INT2FIX(2));
+ ADD_INSN(ret, line, pop);
ADD_LABEL(ret, match_failed);
ADD_INSN(ret, line, pop);