From: ara.t.howard@... Date: 2006-10-25T09:43:02+09:00 Subject: Re: Endianess of the underlying platform 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 ;-) -a -- my religion is very simple. my religion is kindness. -- the dalai lama