mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942
This commit is contained in:
+1
-1
@@ -5506,7 +5506,7 @@ load_exec(mrb_state *mrb, parser_state *p, mrbc_context *c)
|
||||
if (mrb->c->ci) {
|
||||
mrb->c->ci->target_class = target;
|
||||
}
|
||||
v = mrb_context_run(mrb, proc, mrb_top_self(mrb), 0);
|
||||
v = mrb_toplevel_run(mrb, proc);
|
||||
if (mrb->exc) return mrb_nil_value();
|
||||
return v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user