Call all ensure clauses pushed at OP_STOP.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-11-29 12:16:16 +09:00
parent afa53809e2
commit 3e67a116d1
+5 -6
View File
@@ -2884,12 +2884,11 @@ RETRY_TRY_BLOCK:
CASE(OP_STOP) {
/* stop VM */
L_STOP:
{
int epos = mrb->c->ci->epos;
while (mrb->c->eidx > epos) {
ecall(mrb);
}
while (mrb->c->ci > mrb->c->cibase) {
cipop(mrb);
}
while (mrb->c->eidx > 0) {
ecall(mrb);
}
ERR_PC_CLR(mrb);
mrb->jmp = prev_jmp;