From: Tim Pease Date: 2006-10-25T23:55:32+09:00 Subject: Re: Endianess of the underlying platform On 10/24/06, ara.t.howard@noaa.gov wrote: > On Wed, 25 Oct 2006, Tim Pease wrote: > > > Does ruby provide a global or a method call to determine the endianess > > of the underlying platform? > > > > This is what I cooked up, but I'm wondering if there is a ruby way of > > doing this. > > > > > > BIG_ENDIAN = [0xFF00].pack('S') == [0xFF00].pack('n') > > > > > > Blessings, > > TwP > > you could at least have more fun > > little_endian = [42].pack('i')[0] == 42 > > ;-) > Very tricksie of you! I'm always amazed at how your mind operates. TwP