summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-25 15:30:36 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-25 15:30:36 +0000
commita0f4f4369b4d5a04f163bfaa20c4360aba3cee29 (patch)
treeb9729cfd4da7c3a2c4b28f6192c3311cb9afb18b /compile.c
parentd53acd8540e7370cc852222e7e53cb8e904d0cc3 (diff)
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
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c7
1 files changed, 4 insertions, 3 deletions
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)