Permalink
Browse files

Invoke ensure clauses before switching context from fibers; fix #3662

  • Loading branch information...
matz committed May 25, 2017
1 parent ed16535 commit 517cd51cea4bcc61444b02861f3e0d8cb93b6383
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/vm.c
View
@@ -1870,6 +1870,9 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
if (mrb->c->ci == mrb->c->cibase && mrb->c->ci->pc) {
struct mrb_context *c = mrb->c;
while (eidx > 0) {
ecall(mrb, --eidx);
}
mrb->c = c->prev;
c->prev = NULL;
ci = mrb->c->ci;

0 comments on commit 517cd51

Please sign in to comment.