Commit 86946043 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

disclose mrb_top_self() and use it in mruby.c

parent 7edd7762
......@@ -349,6 +349,7 @@ mrb_state* mrb_open_allocf(mrb_allocf);
void mrb_close(mrb_state*);
int mrb_checkstack(mrb_state*,int);
mrb_value mrb_top_self(mrb_state *);
mrb_value mrb_run(mrb_state*, struct RProc*, mrb_value);
mrb_value mrb_p(mrb_state*, mrb_value);
......
......@@ -130,9 +130,9 @@ main(int argc, char **argv)
codedump_all(mrb, n);
if (!args.check_syntax) {
mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_nil_value());
mrb_run(mrb, mrb_proc_new(mrb, mrb->irep[n]), mrb_top_self(mrb));
if (mrb->exc) {
mrb_funcall(mrb, mrb_nil_value(), "p", 1, mrb_obj_value(mrb->exc));
mrb_p(mrb, mrb_obj_value(mrb->exc));
}
}
}
......
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