mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@7263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8f1e166499
commit
5d581bc314
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Nov 14 13:27:03 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/pp.rb (PP#object_address_group): remove odd number of 'f'
|
||||
prefixed to negative address.
|
||||
|
||||
Sun Nov 14 08:46:33 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
||||
|
||||
* test/logger/test_logger.rb: Logger just expects
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue