summaryrefslogtreecommitdiffhomepage
path: root/src/vm.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-05-26 10:50:51 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-05-26 10:50:51 +0900
commite3438f404a64676e4b1bc77a5f103fa858109286 (patch)
tree92728daadc9ff89cf296b6746351824e84060d2a /src/vm.c
parent83fc915213b23b798ea1afef55fddc0836207a83 (diff)
downloadmruby-e3438f404a64676e4b1bc77a5f103fa858109286.tar.gz
mruby-e3438f404a64676e4b1bc77a5f103fa858109286.zip
Invoke ensure clauses on Fiber termination; fix #3666
Related to #3662
Diffstat (limited to 'src/vm.c')
-rw-r--r--src/vm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index 5c4a3bec3..ce5ee9384 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -1848,6 +1848,9 @@ RETRY_TRY_BLOCK:
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;