Permalink
Browse files

Need to unshare env from top callinfo; fix #3685

  • Loading branch information...
matz committed Jun 15, 2017
1 parent ebd6636 commit 6a66ce10b3bacb9d4fe8a58bec8820613bcfa5c3
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/vm.c
View
@@ -1872,14 +1872,15 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
}
ce = mrb->c->cibase + e->cioff;
while (--ci > ce) {
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;
}
ci--;
}
if (ce == mrb->c->cibase) {
localjump_error(mrb, LOCALJUMP_ERROR_RETURN);

0 comments on commit 6a66ce1

Please sign in to comment.