From 92c889c6e8d3eb835ae10b4519897881dc945b32 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 30 Jul 2015 02:52:57 +0000 Subject: load.c: stop separating exits at loading * load.c (rb_load_internal0): stop separating exits at loading from exits from execution. TAG_FATAL is the only case that `errinfo` is a Fixnum, and should continue to exit by JUMP_TAG but not raising as an ordinary exception. [ruby-core:70169] [Bug #11404] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ load.c | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 291ce1f679..d2f4656e5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Jul 30 11:52:55 2015 Nobuyoshi Nakada + + * load.c (rb_load_internal0): stop separating exits at loading + from exits from execution. TAG_FATAL is the only case that + `errinfo` is a Fixnum, and should continue to exit by JUMP_TAG + but not raising as an ordinary exception. + [ruby-core:70169] [Bug #11404] + Thu Jul 30 10:42:27 2015 Alex Dowad * load.c (rb_load_internal0): extra check before returning diff --git a/load.c b/load.c index 54f7307e4c..83fea371f6 100644 --- a/load.c +++ b/load.c @@ -579,7 +579,6 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap) int state; volatile VALUE wrapper = th->top_wrapper; volatile VALUE self = th->top_self; - volatile int loaded = FALSE; volatile int mild_compile_error; #if !defined __GNUC__ rb_thread_t *volatile th0 = th; @@ -606,7 +605,6 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap) th->mild_compile_error++; node = (NODE *)rb_load_file_str(fname); - loaded = TRUE; iseq = rb_iseq_new_top(node, rb_str_new2(""), fname, rb_realpath_internal(Qnil, fname, 1), NULL); th->mild_compile_error--; rb_iseq_eval(iseq); @@ -621,10 +619,6 @@ rb_load_internal0(rb_thread_t *th, VALUE fname, int wrap) th->top_self = self; th->top_wrapper = wrapper; - if (!loaded && !FIXNUM_P(th->errinfo) && state != TAG_THROW) { - /* an error on loading don't include INT2FIX(TAG_FATAL) see r35625 */ - return TAG_RAISE; - } if (state) { VALUE exc = rb_vm_make_jump_tag_but_local_jump(state, Qundef); if (NIL_P(exc)) return state; -- cgit v1.2.3