Quoting Rob Biedenharn <Rob / AgileConsultingLLC.com>:

>
> On Dec 27, 2007, at 10:59 PM, Tom Metge wrote:
>
>> in case anyone else is wondering, my solution:
>>
>> arch =3D `uname -i`
>>
>> tom
>>
>> On Dec 27, 2007, at 8:15 PM, Tom Metge wrote:
>>
>>> subject says it all- anyone know a way to determine if the host  =20
>>> system is 64-bit?  i need to load a different module for different =20
>>>  environments.
>>>
>>> thanks,
>>> tom
>
>
> I only have a 32-bit system to try, but the Pickaxe seems to indicate
> that Fixnum.size is the bytes in the machine representation of a Fixnum.
>
> On my Intel MacBookPro:
>
> irb> Object::PLATFORM
> =3D> "universal-darwin9.0"
> irb> 1.size
> =3D> 4
> irb> (2**30 - 1).class
> =3D> Fixnum
> irb> (2**30 - 1).size
> =3D> 4
> irb> (2**31 - 1).class
> =3D> Bignum
> irb> (2**31 - 1).size
> =3D> 4
> irb> (2**32 - 1).size
> =3D> 4
> irb> (2**33 - 1).size
> =3D> 8
> irb> (2**33 - 1).class
> =3D> Bignum
>
> Note that Fixnum can hold 31 bits (30 + sign bit) and Bignum jumps from
> 4 bytes to 8 bytes.
>
> What do you get for 1.size on a 64-bit platform?
>
> -Rob
>
> Rob Biedenharn=09=09http://agileconsultingllc.com
> Rob / AgileConsultingLLC.com

irb(main):001:0> RUBY_PLATFORM
=3D> "x86_64-linux"
irb(main):002:0> 1.size
=3D> 8


-Justin