Commit 9ccf9767 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

protect return value from mrb_funcall

parent dcfff971
...@@ -224,6 +224,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr ...@@ -224,6 +224,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, int argc, mr
int ai = mrb->arena_idx; int ai = mrb->arena_idx;
val = p->body.func(mrb, self); val = p->body.func(mrb, self);
mrb->arena_idx = ai; mrb->arena_idx = ai;
mrb_gc_protect(mrb, val);
mrb->stack = mrb->stbase + ci->stackidx; mrb->stack = mrb->stbase + ci->stackidx;
cipop(mrb); cipop(mrb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment