summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-19 03:42:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-19 03:42:07 +0000
commitd6fc7d43d7e08fced7323006f14393c4a1462b7d (patch)
treea7789012c139044275c000d85aec84793dcc1ed2 /compile.c
parent6dccc53368652ba5fe0392d0ca8425c79727344a (diff)
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
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 3 insertions, 3 deletions
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)