From d6fc7d43d7e08fced7323006f14393c4a1462b7d Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 19 Jan 2017 03:42:07 +0000 Subject: 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/trunk@57368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- compile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index e521a27e6c..43f63744ec 100644 --- a/compile.c +++ b/compile.c @@ -568,9 +568,6 @@ validate_labels(rb_iseq_t *iseq, st_table *labels_table) { st_foreach(labels_table, validate_label, (st_data_t)iseq); st_free_table(labels_table); - if (!NIL_P(ISEQ_COMPILE_DATA(iseq)->err_info)) { - rb_exc_raise(ISEQ_COMPILE_DATA(iseq)->err_info); - } } VALUE @@ -1133,6 +1130,9 @@ new_child_iseq(rb_iseq_t *iseq, NODE *node, static int iseq_setup(rb_iseq_t *iseq, LINK_ANCHOR *const anchor) { + if (RTEST(ISEQ_COMPILE_DATA(iseq)->err_info)) + return COMPILE_NG; + /* debugs("[compile step 2] (iseq_array_to_linkedlist)\n"); */ if (compile_debug > 5) -- cgit v1.2.3