Project

General

Profile

Misc #17199 ยป 0001-Use-the-object-id-in-the-default-implementation-of-i.patch

tenderlovemaking (Aaron Patterson), 10/20/2020 09:32 PM

View differences:

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 {
    (1-1/1)