diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-14 04:27:39 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-14 04:27:39 +0000 |
commit | aee1d3d56ccc29cfbf03d9aed9b32fe810cc0b76 (patch) | |
tree | 4157cbc6168e0c87b3df024ca61b0414150635b7 /lib | |
parent | 4f7f6e753111a39fad337abbb2d9061f1df00655 (diff) |
* lib/pp.rb (PP#object_address_group): remove odd number of 'f'
prefixed to negative address.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pp.rb | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -219,7 +219,9 @@ class PP < PrettyPrint end def object_address_group(obj, &block) - group(1, "\#<#{obj.class}:#{("0x%x" % (obj.__id__ * 2)).sub(/\.\.f/, '')}", '>', &block) + id = "%x" % (obj.__id__ * 2) + id.sub!(/\Af(?=[[:xdigit:]]{2}+\z)/, '') if id.sub!(/\A\.\./, '') + group(1, "\#<#{obj.class}:0x#{id}", '>', &block) end def comma_breakable |