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
677 677
{
678 678
    VALUE str;
679 679
    VALUE cname = rb_class_name(CLASS_OF(obj));
680
    VALUE object_id = rb_obj_id(obj);
680 681

  
681
    str = rb_sprintf("#<%"PRIsVALUE":%p>", cname, (void*)obj);
682
    str = rb_sprintf("#<%"PRIsVALUE":0x%%x>", cname);
683
    str = rb_str_format(1, &object_id, str);
682 684

  
683 685
    return str;
684 686
}
......
784 786
    if (rb_ivar_count(obj) > 0) {
785 787
	VALUE str;
786 788
	VALUE c = rb_class_name(CLASS_OF(obj));
789
        VALUE object_id = rb_obj_id(obj);
787 790

  
788
	str = rb_sprintf("-<%"PRIsVALUE":%p", c, (void*)obj);
791
        str = rb_sprintf("-<%"PRIsVALUE":0x%%x", c);
792
        str = rb_str_format(1, &object_id, str);
789 793
	return rb_exec_recursive(inspect_obj, obj, str);
790 794
    }
791 795
    else {