remove 2 redundant calls to rb_str_dup
Because `rb_class_path` calls `rb_str_dup` already. Closes: https://github.com/ruby/ruby/pull/2232
This commit is contained in:
parent
69509df2f4
commit
02b1a85385
2
error.c
2
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("#<");
|
||||
|
Loading…
x
Reference in New Issue
Block a user