diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-20 19:59:15 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-23 10:01:30 +0900 |
| commit | 7fbbd7ab9fdeb9eafe6a37fa7f16b60e41e21ad4 (patch) | |
| tree | 4fc5e07434dfdbb6218bc4674cce048ec0317da7 /src/vm.c | |
| parent | 7990bb7fa7ea9a0438aa8d06a76a60c39451b692 (diff) | |
| download | mruby-7fbbd7ab9fdeb9eafe6a37fa7f16b60e41e21ad4.tar.gz mruby-7fbbd7ab9fdeb9eafe6a37fa7f16b60e41e21ad4.zip | |
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()
```
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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); } |
