summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/codegen.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-03-01 10:37:43 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-03-01 10:37:43 +0900
commit8b089c09f7ddaa513d14c84a04e050abc17b01b3 (patch)
tree28887870e4a9911890a90d0d8c663167668941a7 /mrbgems/mruby-compiler/core/codegen.c
parentcd0ac59dd36fc515e3667ab462fe8c4424b5928a (diff)
downloadmruby-8b089c09f7ddaa513d14c84a04e050abc17b01b3.tar.gz
mruby-8b089c09f7ddaa513d14c84a04e050abc17b01b3.zip
Keep space for safe navigation operator; fix #3475
Diffstat (limited to 'mrbgems/mruby-compiler/core/codegen.c')
-rw-r--r--mrbgems/mruby-compiler/core/codegen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c
index 7ce91b826..37f8201ec 100644
--- a/mrbgems/mruby-compiler/core/codegen.c
+++ b/mrbgems/mruby-compiler/core/codegen.c
@@ -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));