Update ci->mid according to surrounding scope; fix #3490

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-03-10 12:37:19 +09:00
parent 2f299cf4dc
commit ff262f2133
+1
View File
@@ -569,6 +569,7 @@ eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
p = mrb_proc_ptr(blk);
ci->proc = p;
ci->argc = 1;
ci->mid = ci[-1].mid;
if (MRB_PROC_CFUNC_P(p)) {
stack_extend(mrb, 3, 0);
mrb->c->stack[0] = self;