summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 2d07719e87..d5f2c4cc1d 100644
--- a/eval.c
+++ b/eval.c
@@ -371,8 +371,10 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
const char *file;
volatile int line = 0;
- if (NIL_P(mesg))
+ if (NIL_P(mesg)) {
mesg = th->errinfo;
+ if (INTERNAL_EXCEPTION_P(mesg)) JUMP_TAG(TAG_FATAL);
+ }
if (NIL_P(mesg)) {
mesg = rb_exc_new(rb_eRuntimeError, 0, 0);
}