summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-08-01 11:56:20 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-08-01 11:56:20 +0900
commit7f282429b0a6d8033be44db012d75a571eab7273 (patch)
treee2f2804c354e0bee4fd149be10fdf1e12bd12716 /src/parse.y
parentc550a0f834a09bbcacf1dfe62545ff256863f7e3 (diff)
downloadmruby-7f282429b0a6d8033be44db012d75a571eab7273.tar.gz
mruby-7f282429b0a6d8033be44db012d75a571eab7273.zip
ci->target_class should be updated as well; #1418
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index 50ba0b1c8..4fa9e70de 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -5245,10 +5245,15 @@ load_exec(mrb_state *mrb, parser_state *p, mrbc_context *c)
if (c) {
if (c->dump_result) codedump_all(mrb, n);
if (c->no_exec) return mrb_fixnum_value(n);
- if (c->target_class) target = c->target_class;
+ if (c->target_class) {
+ target = c->target_class;
+ }
}
proc = mrb_proc_new(mrb, mrb->irep[n]);
proc->target_class = target;
+ if (mrb->c->ci) {
+ mrb->c->ci->target_class = target;
+ }
v = mrb_run(mrb, proc, mrb_top_self(mrb));
if (mrb->exc) return mrb_nil_value();
return v;