Should not overwrite `ci->target_class` in `mrb_exec_irep()`.

For example, the following code behaved wrong:

```ruby
Object.instance_exec(1,2,3){|*a|
  def foo
    42
  end
}
p foo()
```
parent 7990bb7f
......@@ -511,7 +511,6 @@ mrb_exec_irep(mrb_state *mrb, mrb_value self, struct RProc *p)
mrb->c->stack[0] = self;
ci->proc = p;
ci->target_class = MRB_PROC_TARGET_CLASS(p);
if (MRB_PROC_CFUNC_P(p)) {
return MRB_PROC_CFUNC(p)(mrb, self);
}
......
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