From: Daniel Berger Date: 2011-01-29T07:55:21+09:00 Subject: Re: Simple way to detect 32bit vs 64bit? On Jan 28, 3:15 pm, Justin Collins wrote: > On 01/28/2011 12:31 PM, Intransition wrote:> Anyone have simple means for checking if the running arch is 32bit or > > 64bit? > > 1.size => 4 on 32 bit, 8 on 64 bit. As Park Heesob pointed out to me, that's not reliable. Use this instead: ['a'].pack('P').length > 4 ? "64Bit" : "32Bit" Regards, Dan