Skip to content

Commit 517cd51

Browse files
committed
Invoke ensure clauses before switching context from fibers; fix #3662
1 parent ed16535 commit 517cd51

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vm.c

+3
Original file line numberDiff line numberDiff line change
@@ -1870,6 +1870,9 @@ mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
18701870
if (mrb->c->ci == mrb->c->cibase && mrb->c->ci->pc) {
18711871
struct mrb_context *c = mrb->c;
18721872

1873+
while (eidx > 0) {
1874+
ecall(mrb, --eidx);
1875+
}
18731876
mrb->c = c->prev;
18741877
c->prev = NULL;
18751878
ci = mrb->c->ci;

0 commit comments

Comments
 (0)