Keep space for safe navigation operator; fix #3475

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-03-01 10:37:43 +09:00
parent cd0ac59dd3
commit 8b089c09f7
+1
View File
@@ -863,6 +863,7 @@ gen_call(codegen_scope *s, node *tree, mrb_sym name, int sp, int val, int safe)
genop(s, MKOP_A(OP_LOADNIL, cursp()));
push();
genop(s, MKOP_AB(OP_MOVE, cursp(), recv));
push(); pop(); /* space for a block */
pop();
idx = new_msym(s, mrb_intern_lit(s->mrb, "=="));
genop(s, MKOP_ABC(OP_EQ, cursp(), idx, 1));