diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-09-11 22:46:34 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-09-11 22:46:34 +0900 |
| commit | 3d8c1a7e97521e73703e198d1383839c201787ec (patch) | |
| tree | ef047a897b121106119fca51105b4f25a63b6ecf /src/vm.c | |
| parent | 2a1e616e4da864bb918583cc6d85a0b130c1ab43 (diff) | |
| download | mruby-3d8c1a7e97521e73703e198d1383839c201787ec.tar.gz mruby-3d8c1a7e97521e73703e198d1383839c201787ec.zip | |
The ensure stack may be empty at `OP_EPOP`; fix 1st part of #3809
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1322,10 +1322,13 @@ RETRY_TRY_BLOCK: mrb_callinfo *ci, *nci; mrb_value self = regs[0]; - /* temporary limitation */ - mrb_assert(a==1); - proc = mrb->c->ensure[--mrb->c->eidx]; + mrb_assert(a==1); /* temporary limitation */ ci = mrb->c->ci; + if (mrb->c->eidx == ci->epos) { + NEXT; + } + + proc = mrb->c->ensure[--mrb->c->eidx]; nci = cipush(mrb); nci->mid = ci->mid; nci->argc = 0; |
