Skip to content

Commit

Permalink
Restore callinfo offset in mrb_yield_with_class()
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Dec 13, 2016
1 parent d196e4d commit df35076
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vm.c
Expand Up @@ -654,11 +654,13 @@ mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value
if (MRB_PROC_CFUNC_P(p)) { if (MRB_PROC_CFUNC_P(p)) {
val = p->body.func(mrb, self); val = p->body.func(mrb, self);
mrb->c->stack = mrb->c->ci->stackent; mrb->c->stack = mrb->c->ci->stackent;
cipop(mrb);
} }
else { else {
int cioff = mrb->c->ci - mrb->c->cibase;
val = mrb_run(mrb, p, self); val = mrb_run(mrb, p, self);
mrb->c->ci = mrb->c->cibase + cioff;
} }
cipop(mrb);
return val; return val;
} }


Expand Down

0 comments on commit df35076

Please sign in to comment.