summaryrefslogtreecommitdiff
path: root/lib/pp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pp.rb')
-rw-r--r--lib/pp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index bc61484148..5e4f20cedf 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -142,7 +142,7 @@ class PP < PrettyPrint
# Object#pretty_print_cycle is used when +obj+ is already
# printed, a.k.a the object reference chain has a cycle.
def pp(obj)
- id = obj.__id__
+ id = obj.object_id
if check_inspect_key(id)
group {obj.pretty_print_cycle self}
@@ -180,7 +180,7 @@ class PP < PrettyPrint
end
def object_address_group(obj, &block)
- id = PointerFormat % (obj.__id__ * 2 & PointerMask)
+ id = PointerFormat % (obj.object_id * 2 & PointerMask)
group(1, "\#<#{obj.class}:0x#{id}", '>', &block)
end