From a0f4f4369b4d5a04f163bfaa20c4360aba3cee29 Mon Sep 17 00:00:00 2001 From: usa Date: Sat, 25 Mar 2017 15:30:36 +0000 Subject: merge revision(s) 57368: [Backport #12613] compile.c: check err_info * compile.c (iseq_setup): bail out if any errors found. [ruby-core:76531] [Bug #12613] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@58090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index e6742f073e..db6e4f6f97 100644 --- a/compile.c +++ b/compile.c @@ -478,9 +478,6 @@ static void validate_labels(rb_iseq_t *iseq, st_table *labels_table) { st_foreach(labels_table, validate_label, (st_data_t)iseq); - if (!NIL_P(iseq->compile_data->err_info)) { - rb_exc_raise(iseq->compile_data->err_info); - } } VALUE @@ -1046,6 +1043,10 @@ new_child_iseq(rb_iseq_t *iseq, NODE *node, static int iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *anchor) { + if (!NIL_P(iseq->compile_data->err_info)) { + return COMPILE_NG; + } + /* debugs("[compile step 2] (iseq_array_to_linkedlist)\n"); */ if (compile_debug > 5) -- cgit v1.2.3