aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--load.c6
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 <nobu@ruby-lang.org>
+
+ * 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 <alexinbeijing@gmail.com>
* 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("<top (required)>"), 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;