From: Heesob Park Date: 2013-05-21T10:23:19+09:00 Subject: Re: RubyInstaller 2.0.0-p195 released Hi, 2013/5/21 Rob Biedenharn : > > On 2013-May-20, at 12:24 , Jabari Z. wrote: > >> I installed ruby-2.0.0-p195 on Windows 7 Premium Home Edition (64-bit) >> but it has 32-bit numbers versus 64-bit ones. >> >> So if you do this you get >>> (2**32).class >> => Bignum >> >> For a 64-bit build numbers should be Fixnum all the way up to (2**63-1). >> >> On my VirtualBox install of Linux Mint 14 (64-bit) that is what I get >> for rvm install of ruby-2.0.0-p195 > > Just ask ruby for the size of a known Fixnum: > > $ ruby -v -e 'puts 1.size' > ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin11.4.2] > 8 > > Fixnum#size returns the number of bytes in the representation. On a 32-bit system, you'd get 1.size==4 instead. > > -ROb Windows uses LLP64 data models, which maintains compatibility with 32-bit code by leaving both int and long as 32-bit. C:\Users\phasis>ruby -ve 'puts 1.size' ruby 2.0.0p195 (2013-05-14) [i386-mingw32] 4 C:\Users\phasis>ruby -ve 'puts 1.size' ruby 2.0.0p195 (2013-05-14) [x64-mingw32] 4 C:\Users\phasis>ruby -ve "puts ['a'].pack('P').length" ruby 2.0.0p195 (2013-05-14) [i386-mingw32] 4 C:\Users\phasis>ruby -ve "puts ['a'].pack('P').length" ruby 2.0.0p195 (2013-05-14) [x64-mingw32] 8 Refer to http://en.wikipedia.org/wiki/LLP64#64-bit_data_models Regards, Park Heesob