ruby-changes:58367
From: Nobuyoshi <ko1@a...>
Date: Wed, 23 Oct 2019 02:50:48 +0900 (JST)
Subject: [ruby-changes:58367] afab8122c3 (master): Fix the exception when CPDEBUG
https://git.ruby-lang.org/ruby.git/commit/?id=afab8122c3 From afab8122c339586ccb120861cc700aa8eee7402c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 23 Oct 2019 02:04:36 +0900 Subject: Fix the exception when CPDEBUG diff --git a/compile.c b/compile.c index c25ffbe..0ca8757 100644 --- a/compile.c +++ b/compile.c @@ -391,7 +391,10 @@ append_compile_error(const rb_iseq_t *iseq, int line, const char *fmt, ...) https://github.com/ruby/ruby/blob/trunk/compile.c#L391 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/