Skip to content

Commit

Permalink
preserve only arguments on stack; fix #1527
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Oct 30, 2013
1 parent c2ad094 commit f8fea69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
if (!mrb->c->stack) {
stack_init(mrb);
}
stack_extend(mrb, irep->nregs, irep->nregs);
stack_extend(mrb, irep->nregs, mrb->c->ci->argc + 2); /* argc + 2 (receiver and block) */
mrb->c->ci->err = pc;
mrb->c->ci->proc = proc;
mrb->c->ci->nregs = irep->nregs + 1;
Expand Down

0 comments on commit f8fea69

Please sign in to comment.