On Feb 6, 7:56 am, Eivind Eklund
> On Feb 6, 2008 2:20 AM,rule.rule.r...@gmail.com
>
>
> > Hi,
>
> > I added some paragraphs to theRubyarticle on Wikipedia:
>
> > Type system
> > - IsRubytype-safe?
> > - IsRubystrongly typed?
>
> Def 8 seems to be wrong; you're looking at what a variable refers to,
> rather than the object type. The object type is constant throughout
> object lifetime inRuby(excepting some hacks that I think are
> C-based).
>
> Eivind.
OK, I see what you mean...
So this might then be a better example of the type of an object
changing at runtime in Ruby...
x = 4
class Fixnum
def twice
to_i * 2
end
end
puts x.twice