summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-27 23:51:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-27 23:51:08 +0900
commitb8e434a5e6ed2884e70a77c28430fb8bc1d372dc (patch)
tree6796386ffbb014d895b0634d5ef488b2d790ef87
parentf2c086d7d54930bf1894f262995858f2e9deb999 (diff)
downloadmruby-b8e434a5e6ed2884e70a77c28430fb8bc1d372dc.tar.gz
mruby-b8e434a5e6ed2884e70a77c28430fb8bc1d372dc.zip
initialize ci->target_class in mrb_toplevel_run; ref #1942 close mattn/mruby-require#20
-rw-r--r--src/vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vm.c b/src/vm.c
index 7f49c0906..ca1def05f 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -2284,6 +2284,7 @@ mrb_toplevel_run(mrb_state *mrb, struct RProc *proc)
ci->acc = CI_ACC_SKIP;
ci->eidx = 0;
ci->ridx = 0;
+ ci->target_class = mrb->object_class;
v = mrb_context_run(mrb, proc, mrb_top_self(mrb), 0);
cipop(mrb);