diff --git a/eval.c b/eval.c index ff17ad343c..24e6dac079 100644 --- a/eval.c +++ b/eval.c @@ -647,6 +647,10 @@ rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause) cause = get_ec_errinfo(ec); } if (cause != mesg) { + if (THROW_DATA_P(cause)) { + cause = Qnil; + } + rb_ivar_set(mesg, id_cause, cause); } } diff --git a/version.h b/version.h index 9b392f9c64..f21fc65fcc 100644 --- a/version.h +++ b/version.h @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 2 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 88 +#define RUBY_PATCHLEVEL 89 #include "ruby/version.h" #include "ruby/internal/abi.h"