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

parent f2c086d7
......@@ -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);
......
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