summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-08-01 12:54:57 +0900
committerYukihiro Matsumoto <[email protected]>2012-08-01 12:54:57 +0900
commit7511508a64250af30fdad4b7e342bb703e7af6c9 (patch)
treebda9c150745998c0ea0cd2d1c19fcc65306f96d1 /src
parent0220953efe0c4dba5ce4af5057faa2d56fda6553 (diff)
downloadmruby-7511508a64250af30fdad4b7e342bb703e7af6c9.tar.gz
mruby-7511508a64250af30fdad4b7e342bb703e7af6c9.zip
restore arena index after funcall
Diffstat (limited to 'src')
-rw-r--r--src/vm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index 3e7dd2084..2a13f0ea4 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -219,7 +219,9 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, const char *name, int arg
mrb->stack[argc+1] = blk;
if (MRB_PROC_CFUNC_P(p)) {
+ int ai = mrb->arena_idx;
val = p->body.func(mrb, self);
+ mrb->arena_idx = ai;
mrb->stack = mrb->stbase + ci->stackidx;
cipop(mrb);
}