summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-01-04 01:30:38 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-01-04 01:30:38 +0900
commit2122cf48dbba4cc363c5c8d26a844f1bc55134d6 (patch)
tree93c96d55cbd1fd71d8cd1b59fe318e75f46cbb88
parent6bcbef5064ee2711219fac901dcbe2ea974f1ad4 (diff)
downloadmruby-2122cf48dbba4cc363c5c8d26a844f1bc55134d6.tar.gz
mruby-2122cf48dbba4cc363c5c8d26a844f1bc55134d6.zip
pop ensure stack before execution; close #1638
-rw-r--r--src/vm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index adb943961..863e93f60 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -264,6 +264,8 @@ ecall(mrb_state *mrb, int i)
p = mrb->c->ensure[i];
if (!p) return;
+ if (mrb->c->ci->eidx < i)
+ mrb->c->ci->eidx = i;
ci = cipush(mrb);
ci->stackidx = mrb->c->stack - mrb->c->stbase;
ci->mid = ci[-1].mid;