vm: execute ensure without exception at the top of the fiber; fix #2904

This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-07-30 16:46:31 +09:00
parent 89ebb0c4f1
commit f0040b5371
+1 -1
View File
@@ -1032,7 +1032,7 @@ RETRY_TRY_BLOCK:
mrb_callinfo *ci = mrb->c->ci;
int n, eidx = ci->eidx;
for (n=0; n<a && eidx > ci[-1].eidx; n++) {
for (n=0; n<a && (ci == mrb->c->cibase || eidx > ci[-1].eidx); n++) {
ecall(mrb, --eidx);
ARENA_RESTORE(mrb, ai);
}