diff options
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -467,9 +467,12 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg) !rb_obj_is_kind_of(e, rb_eSystemExit)) { int status; + mesg = e; PUSH_TAG(); if ((status = EXEC_TAG()) == 0) { - RB_GC_GUARD(e) = rb_obj_as_string(e); + th->errinfo = Qnil; + e = rb_obj_as_string(mesg); + th->errinfo = mesg; if (file && line) { warn_printf("Exception `%s' at %s:%d - %s\n", rb_obj_classname(th->errinfo), |