Misc #17199 ยป 0001-Use-the-object-id-in-the-default-implementation-of-i.patch
| object.c | ||
|---|---|---|
|
{
|
||
|
VALUE str;
|
||
|
VALUE cname = rb_class_name(CLASS_OF(obj));
|
||
|
VALUE object_id = rb_obj_id(obj);
|
||
|
str = rb_sprintf("#<%"PRIsVALUE":%p>", cname, (void*)obj);
|
||
|
str = rb_sprintf("#<%"PRIsVALUE":0x%%x>", cname);
|
||
|
str = rb_str_format(1, &object_id, str);
|
||
|
return str;
|
||
|
}
|
||
| ... | ... | |
|
if (rb_ivar_count(obj) > 0) {
|
||
|
VALUE str;
|
||
|
VALUE c = rb_class_name(CLASS_OF(obj));
|
||
|
VALUE object_id = rb_obj_id(obj);
|
||
|
str = rb_sprintf("-<%"PRIsVALUE":%p", c, (void*)obj);
|
||
|
str = rb_sprintf("-<%"PRIsVALUE":0x%%x", c);
|
||
|
str = rb_str_format(1, &object_id, str);
|
||
|
return rb_exec_recursive(inspect_obj, obj, str);
|
||
|
}
|
||
|
else {
|
||