Skip to content

Commit

Permalink
Use C-level API to generate object identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
meinac committed Aug 26, 2021
1 parent 27410ea commit f9c1b7a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions error.c
Original file line number Diff line number Diff line change
Expand Up @@ -1987,10 +1987,8 @@ name_err_mesg_to_str(VALUE obj)
default:
d = rb_protect(name_err_mesg_receiver_name, obj, &state);
if (state || d == Qundef || d == Qnil)
d = rb_protect(rb_inspect, obj, &state);
if (state) {
rb_set_errinfo(Qnil);
}
d = rb_any_to_s(obj);

d = rb_check_string_type(d);
if (NIL_P(d)) {
d = rb_any_to_s(obj);
Expand Down

0 comments on commit f9c1b7a

Please sign in to comment.