Sha256: ad0ca7cdc57247cd07d85143927a22c66d0f9243732cccd9432bfb656795ec7e
Contents?: true
Size: 554 Bytes
Versions: 5
Compression:
Stored size: 554 Bytes
Contents
module Kernel if RUBY_VERSION < "1.8.7" # Returns the object id as a string in hexideciaml, # which is how Ruby reports them with inspect. # # "ABC".object_hexid #=> "0x402d359c" def object_hexid return "0x" << (('%.x' % (2*self.__id__))[1..-1]) end else # Returns the object id as a string in hexideciaml, # which is how Ruby reports them with inspect. # # "ABC".object_hexid #=> "0x402d359c" def object_hexid return "0x" << ('%.x' % (2*self.__id__)) #[1..-1] end end end
Version data entries
5 entries across 5 versions & 1 rubygems