diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-01 10:37:43 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-03-01 10:37:43 +0900 |
| commit | 8b089c09f7ddaa513d14c84a04e050abc17b01b3 (patch) | |
| tree | 28887870e4a9911890a90d0d8c663167668941a7 /mrbgems/mruby-compiler | |
| parent | cd0ac59dd36fc515e3667ab462fe8c4424b5928a (diff) | |
| download | mruby-8b089c09f7ddaa513d14c84a04e050abc17b01b3.tar.gz mruby-8b089c09f7ddaa513d14c84a04e050abc17b01b3.zip | |
Keep space for safe navigation operator; fix #3475
Diffstat (limited to 'mrbgems/mruby-compiler')
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 1 |
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)); |
