--8323329-1358196177-12635745873678
Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1358196177-1263574587=:23678"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323329-1358196177-12635745873678
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Sat, 16 Jan 2010, Walton Hoops wrote:

> On 1/15/2010 9:36 AM, Walton Hoops wrote:
>> On 1/14/2010 4:12 PM, IƱaki Baz Castillo wrote:
>>> Hi, is there a reliable way under Ruby to know the OS architecture (32 or 
>>> 64
>>> bits)?
>>> 
>>> I've just found RUBY_PLATFORM constant which returns "x86_64-linux" under 
>>> 64
>>> bits, however it doesn't send very reliable for me.
>>> 
>>> I need a way working under Linux and BSD. Thanks for any suggestion.
>>> 
>> 
>> I can't vouch for how accurate it is, but an OS gem was recently announced 
>> on this list.
>> gem install os
>> 
>> irb(main):001:0> require 'os'
>> => true
>> irb(main):002:0> OS.bits
>> => 64
>> irb(main):004:0> OS.posix?
>> => true
>> irb(main):005:0>
>> 
>> 
> Hmm.. it does not appear to deal with 32-bit ruby running on a 64 bit system 
> though.
> On my Windows 7 x64 (with 32-bit ruby):
> irb(main):005:0> OS.bits
> => 32
> irb(main):006:0> 1.size
> => 4
> irb(main):007:0>
>

Correct me if I'm wrong, but don't 32bit apps running in a 64bit 
architecture run in a special space which mimics 32 bits?  If that's the 
case, then I'd think the behaviour was as expected.

Matt
--8323329-1358196177-12635745873678--
--8323329-1358196177-12635745873678--