Permalink
Browse files

Unshare popped TT_ENV objects.

  • Loading branch information...
matz committed Mar 4, 2017
1 parent 3b40a2f commit 4f43db862a19df01720f72cc91925a497c7d7f45
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/vm.c
View
@@ -1676,6 +1676,9 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
ce = mrb->c->cibase + e->cioff;
while (--ci > ce) {
if (ci->env) {
mrb_env_unshare(mrb, ci->env);
}
if (ci->acc < 0) {
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);
goto L_RAISE;
@@ -1727,6 +1730,9 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
mrb->c->ci = ci;
break;
}
if (ci->env) {
mrb_env_unshare(mrb, ci->env);
}
ci--;
}
break;

0 comments on commit 4f43db8

Please sign in to comment.