diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-05-26 10:50:51 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-05-26 10:50:51 +0900 |
| commit | e3438f404a64676e4b1bc77a5f103fa858109286 (patch) | |
| tree | 92728daadc9ff89cf296b6746351824e84060d2a /src | |
| parent | 83fc915213b23b798ea1afef55fddc0836207a83 (diff) | |
| download | mruby-e3438f404a64676e4b1bc77a5f103fa858109286.tar.gz mruby-e3438f404a64676e4b1bc77a5f103fa858109286.zip | |
Invoke ensure clauses on Fiber termination; fix #3666
Related to #3662
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |
