Skip to content
Permalink
Browse files
Invoke ensure clauses on Fiber termination; fix #3666
Related to #3662
  • Loading branch information
matz committed May 26, 2017
1 parent 83fc915 commit e3438f404a64676e4b1bc77a5f103fa858109286
Showing 1 changed file with 3 additions and 0 deletions.
@@ -1848,6 +1848,9 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
mrb_exc_set(mrb, exc);
goto L_RAISE;
}
while (eidx > 0) {
ecall(mrb, --eidx);
}
/* automatic yield at the end */
mrb->c->status = MRB_FIBER_TERMINATED;
mrb->c = mrb->c->prev;

0 comments on commit e3438f4

Please sign in to comment.