From: Arlen Cuss Date: 2008-02-21T10:49:41+09:00 Subject: Re: Ruby type-safe? Ruby strongly/weakly typed? Ruby pitfalls? ------=_Part_642_19476741.1203558589660 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, Feb 21, 2008 at 3:18 AM, Moises Trovo wrote: > ... > > irb(main):001:0> 4.class > => Fixnum > irb(main):002:0> (4.to_i*2).class > => Fixnum > > The type doesn't change in your example. > > Moreover, the type will never change in its lifetime, as Eivind mentioned. Sure, they have plenty of methods that return different types (String#split, Integer#to_f, Symbol#to_proc [1.9/Rails]...), but nothing alters the object's type itself. Arlen ------=_Part_642_19476741.1203558589660--