El Viernes, 15 de Enero de 2010, Iaki Baz Castillo escribi:

> Note that to know the bits it uses "rbconfig" gem, and them:

Well, "rbconfig" is not a gem but a Ruby built in library.



> In my server RbConfig::CONFIG['host_os'] = "linux-gnu" so finally it ends
> doing:
> 
>           if (1<<32).class == Fixnum
>             64
>           else
>             32
>           end
> 
> Which is basically the same as doing
> 
>   if 1.size == 8
>     64
>   else
>     32
>   end
> 


Definitively I don't like "os" gem at all. It could use 
RbConfig::CONFIG['host_cpu'] rather than the not reliable 
RbConfig::CONFIG['host_os']:


a) 32 bits host:

  RbConfig::CONFIG['host_os']  => "linux-gnu"
  RbConfig::CONFIG['host_cpu'] => "i486"

b) 64 bits host:

  RbConfig::CONFIG['host_os']  => "linux-gnu"
  RbConfig::CONFIG['host_cpu'] => "x86_64"
  

-- 
Iaki Baz Castillo <ibc / aliax.net>