summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pp.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pp.rb b/lib/pp.rb
index 2fcb4af820..cda282448b 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -164,13 +164,7 @@ class PP < PrettyPrint
group(1, '#<' + obj.class.name, '>', &block)
end
- if 0x100000000.class == Bignum
- # 32bit
- PointerMask = 0xffffffff
- else
- # 64bit
- PointerMask = 0xffffffffffffffff
- end
+ PointerMask = (1 << ([""].pack("p").size * 8)) - 1
case Object.new.inspect
when /\A\#<Object:0x([0-9a-f]+)>\z/