From: Lloyd Linklater Date: 2008-09-04T22:27:27+09:00 Subject: Re: Can a Ruby program determine whether it's running on a 32-bit or 64-bit system? Suraj Kurapati wrote: > Eric Promislow wrote: >> Can a Ruby program determine whether >> it's running on a 32-bit or 64-bit system? > > Yes. Look at the result of calling the 'size' method on a Fixnum; it > will be 4 on 32-bit machines, and 8 on 64-bit machines. > >>> 0.size > => 4 On my 32 bit machine I get this: p 0.size => 8 p [ -1 ].pack('l!').length => 4 I am not sure why, but there it is, fyi. -- Posted via http://www.ruby-forum.com/.