summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/error.c b/error.c
index ab252a6d6b..b58f0f76d5 100644
--- a/error.c
+++ b/error.c
@@ -524,8 +524,7 @@ exc_to_s(VALUE exc)
VALUE mesg = rb_attr_get(exc, rb_intern("mesg"));
if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc));
- OBJ_INFECT(mesg, exc);
- return mesg;
+ return rb_String(mesg);
}
/*