summaryrefslogtreecommitdiff
path: root/lib/pp.rb
diff options
context:
space:
mode:
authorRichard Viney <[email protected]>2017-01-22 14:50:08 +1300
committerNobuyoshi Nakada <[email protected]>2019-12-16 23:43:49 +0900
commit6a75a460536a32fb62184dc5d8d66ddd737a9bad ()
tree1b977518ac32ecbdc987f87b487306485f0a136e /lib/pp.rb
parent251f5d8226dbde06ba06e980e3b741b45ae3826d (diff)
Make prettyprint’s cycle detection aware of Delegator instances
Fixes [Bug #13144] Co-Authored-By: Nobuyoshi Nakada <[email protected]>
-rw-r--r--lib/pp.rb4
1 files changed, 4 insertions, 0 deletions
@@ -149,6 +149,10 @@ 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)
if check_inspect_key(obj)
group {obj.pretty_print_cycle self}
return