aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--error.c2
-rw-r--r--object.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/error.c b/error.c
index 19265f65cb..ffe34afc11 100644
--- a/error.c
+++ b/error.c
@@ -1098,7 +1098,7 @@ exc_inspect(VALUE exc)
klass = CLASS_OF(exc);
exc = rb_obj_as_string(exc);
if (RSTRING_LEN(exc) == 0) {
- return rb_str_dup(rb_class_name(klass));
+ return rb_class_name(klass);
}
str = rb_str_buf_new2("#<");
diff --git a/object.c b/object.c
index 00a70898f3..17964bb5c8 100644
--- a/object.c
+++ b/object.c
@@ -1800,7 +1800,7 @@ rb_mod_to_s(VALUE klass)
rb_str_cat2(s, ">");
return s;
}
- return rb_str_dup(rb_class_name(klass));
+ return rb_class_name(klass);
}
/*