Skip to content

Commit

Permalink
Keep space for safe navigation operator; fix #3475
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Mar 1, 2017
1 parent cd0ac59 commit 8b089c0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mrbgems/mruby-compiler/core/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 8b089c0

Please sign in to comment.