initialize ci->target_class in mrb_toplevel_run; ref #1942 close mattn/mruby-require#20

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-03-27 23:51:08 +09:00
parent f2c086d7d5
commit b8e434a5e6
+1
View File
@@ -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);