Skip to content

Commit

Permalink
Expand stack for method_missing; fix #3528
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 1, 2017
1 parent 9eb2ed0 commit 195af52
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,10 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
mid = missing;
if (n != CALL_MAXARGS) {
mrb_value blk = regs[bidx];

if (a+2 > irep->nregs) {
stack_extend(mrb, a+2, a+n+1);
}
regs[a+1] = mrb_ary_new_from_values(mrb, n, regs+a+1);
regs[a+2] = blk;
n = CALL_MAXARGS;
Expand Down

0 comments on commit 195af52

Please sign in to comment.