From d3cde81666e0b5ff91b6c2437b8840d883f2ac3e Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 6 Oct 2016 08:29:46 +0000 Subject: load.c: setup syntax error backtrace * load.c (rb_require_safe): SyntaxError created by the parser just has the mesage and needs to set up the backtrace. [ruby-core:77491] [Bug #12811] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- load.c | 1 + 1 file changed, 1 insertion(+) (limited to 'load.c') diff --git a/load.c b/load.c index 82bf07c306..3cf9ce0aba 100644 --- a/load.c +++ b/load.c @@ -1040,6 +1040,7 @@ rb_require_safe(VALUE fname, int safe) int result = rb_require_internal(fname, safe); if (result > TAG_RETURN) { + if (result == TAG_RAISE) rb_exc_raise(rb_errinfo()); JUMP_TAG(result); } if (result < 0) { -- cgit v1.2.3