Need to clear mrb->c->cibase->ridx (toplevel ridx) at L_STOP; fix #4092

This problem only appears when `mrb` executed multiple times (i.e. `mirb`)
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-08-30 01:20:59 +09:00
parent 500bd38dfe
commit 5addd5db4a
+1
View File
@@ -2954,6 +2954,7 @@ RETRY_TRY_BLOCK:
while (mrb->c->eidx > 0) {
ecall(mrb);
}
mrb->c->cibase->ridx = 0;
ERR_PC_CLR(mrb);
mrb->jmp = prev_jmp;
if (mrb->exc) {