From: Heesob Park Date: 2010-03-20T14:37:46+09:00 Subject: Re: is there any way to fin 32 bit or 64 bit version? 2010/3/19 Daniel Berger : > > > On Mar 18, 11:02 pm, dare ruby wrote: >> Dear friends, >> >> Is there any way to find whether the installed ruby is of 32 bit version >> or 64 bit version. > > -1.size > 4 ? "64Bit" : "32Bit" > That's not true for MS Windows. c:\work\ruby-1.9.1-p376>ruby -ve 'p(-1.size)' ruby 1.9.1p376 (2009-12-07 revision 26041) [x64-mswin64_90] 4 Try: ['a'].pack('P').length > 4 ? "64Bit" : "32Bit" Regards, Park Heesob