Hi --

On Mon, 31 Jan 2005, Paul Sanchez wrote:

> In article <Pine.LNX.4.61.0501301625190.29793 / wobblini>,
> "David A. Black" <dblack / wobblini.net> wrote:
>
>>> irb(main):001:0> (2**30 - 1).type
>>> => Fixnum
>>> irb(main):002:0> (2**30).type
>>> => Bignum
>>
>> What version of Ruby are you using?  In recent Rubies you'll get a
>> warning:
>>
>>    "".irb(main):001:0> "".type
>>    (irb):1: warning: Object#type is deprecated; use Object#class
>>    => String
>
> v1.6.8, which shipped with Mac OS X.  That happened to be the machine I
> was using at that moment.  If it makes you happier substitute "class"
> for "type" in the irb session I showed.  I don't think it changes the
> explanation.

You'll be happier too :-)  I think your previous post was predicated
on interpreting the previous poster's use of the word "type" as
meaning "class" -- hence your offering of the explanation.  It's true
that you can't change an object's class, but that wasn't what he
meant, so the conflation of the terms led to confusion at that level.
That's all I meant.  Anyway, Object#type's days are numbered,
thankfully.


David

-- 
David A. Black
dblack / wobblini.net