From: ts Date: 2005-11-03T20:17:50+09:00 Subject: Re: Detect if the computer is little or big endian >>>>> "P" == Patrik Maunus writes: P> How can I know if my computer is little or big endian with Ruby? You can test if [1].pack("I") == [1].pack("N") rex% ruby -rrbconfig -e 'p Config::CONFIG["host"] if [1].pack("N") == [1].pack("I")' "sparc-sun-solaris2.7" rex% moulon% ruby -rrbconfig -e 'p Config::CONFIG["host"] unless [1].pack("N") == [1].pack("I")' "i686-pc-linux-gnu" moulon% Guy Decoux