From: Lionel Bouton Date: 2007-07-29T07:56:17+09:00 Subject: Re: checking if machine is 64-bit Suraj Kurapati wrote: > Suraj Kurapati wrote: > >> is_machine_64_bit = (2 ** 32).is_a? Fixnum >> > > Hmm, after reading the ri manpage for Fixnum, I found a better way: > > (-1.size) is 4 on a 32-bit machine and 8 on a 64-bit machine. > I don't know if it matters to you, but IIRC there are architectures with different sizes for integers and memory addresses (64 bit integers with 32 bit addresses if memory serves). Lionel.