Permalink
Browse files

Keep space for safe navigation operator; fix #3475

  • Loading branch information...
matz committed Mar 1, 2017
1 parent cd0ac59 commit 8b089c09f7ddaa513d14c84a04e050abc17b01b3
Showing with 1 addition and 0 deletions.
  1. +1 −0 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));

0 comments on commit 8b089c0

Please sign in to comment.