Skip to content

Commit

Permalink
Use env preserved in Proc structure in ecall(); fix #3612
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Apr 22, 2017
1 parent 5513fce commit e26e118
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ ecall(mrb_state *mrb, int i)
ci->acc = CI_ACC_SKIP;
ci->argc = 0;
ci->proc = p;
ci->env = p->env;
ci->nregs = p->body.irep->nregs;
ci->target_class = p->target_class;
mrb->c->stack = mrb->c->stack + ci[-1].nregs;
Expand Down

0 comments on commit e26e118

Please sign in to comment.