Copyright (c) 2003 Michael Neumann
# File lib/more/facets/platform.rb, line 225 def big_endian? byte_order == BigEndian end
examines the byte order of the underlying machine
# File lib/more/facets/platform.rb, line 211 def byte_order if [0x12345678].pack("L") == "\x12\x34\x56\x78" BigEndian else LittleEndian end end
# File lib/more/facets/platform.rb, line 221 def little_endian? byte_order == LittleEndian end