summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-23 02:04:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-10-23 02:04:36 +0900
commitafab8122c339586ccb120861cc700aa8eee7402c (patch)
tree15f2622406f1f4cb70291b3220b524dc4f866b08 /compile.c
parent801a11d0ab3e1d387b5aaed92d1965fbdf675780 (diff)
Fix the exception when CPDEBUG
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index c25ffbe27f..0ca8757c05 100644
--- a/compile.c
+++ b/compile.c
@@ -391,7 +391,10 @@ append_compile_error(const rb_iseq_t *iseq, int line, const char *fmt, ...)
else if (!err_info) {
RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->err_info, Qtrue);
}
- if (compile_debug) rb_exc_fatal(err);
+ if (compile_debug) {
+ if (SPECIAL_CONST_P(err)) err = rb_eSyntaxError;
+ rb_exc_fatal(err);
+ }
}
#if 0