From: "vbatts (Vincent Batts)" Date: 2013-02-05T11:03:34+09:00 Subject: [ruby-core:51862] [ruby-trunk - Bug #7656] Handful of documentations Issue #7656 has been updated by vbatts (Vincent Batts). interesting, doing a little bootleg debugging diff --git a/lib/pp.rb b/lib/pp.rb index 6e0c797..681956d 100644 --- a/lib/pp.rb +++ b/lib/pp.rb @@ -145,13 +145,16 @@ class PP < PrettyPrint def pp(obj) id = obj.object_id + puts check_inspect_key(id) if check_inspect_key(id) group {obj.pretty_print_cycle self} return end begin - push_inspect_key(id) + puts push_inspect_key(id) + puts check_inspect_key(id) + p Thread.current[:__recursive_key__][:inspect] group {obj.pretty_print self} ensure pop_inspect_key(id) unless PP.sharing_detection and running <~/foo.rb> class Foo def pretty_print(q) q.text 'foo' end end f = Foo.new pp f I get the following results: vbatts@satellite ~/src/ruby (trunk) $ ruby -I./lib -r pp ~/foo.rb false true true {67976200=>true, 67976030=>true} foo ---------------------------------------- Bug #7656: Handful of documentations https://bugs.ruby-lang.org/issues/7656#change-35842 Author: vbatts (Vincent Batts) Status: Feedback Priority: Normal Assignee: vbatts (Vincent Batts) Category: DOC Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-12-08) [i686-linux] This fixes documentation in ENV, adds a little for debug.rb, and completes PP -- http://bugs.ruby-lang.org/