summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-03-26 01:09:09 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-03-26 01:09:09 +0900
commitbfd2a539edab8ef7935a75de8a6885d74ff9e8ef (patch)
treefce8fd6d21b944d892fc9a9e718f6afd16a79a7d /src/parse.y
parentb042b951ce4003f00dc33cdac1c9d422e1a21d55 (diff)
downloadmruby-bfd2a539edab8ef7935a75de8a6885d74ff9e8ef.tar.gz
mruby-bfd2a539edab8ef7935a75de8a6885d74ff9e8ef.zip
add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index 67d1aee2f..e6ac036bc 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -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;
}