logo       

=== again: msg#01184

lang.ruby.general

Subject: === again

I'm pretty sure I said something stupid
last night.

Just to clarify: If I make a test like
x.is_a? y
I am checking whether the instance x
is-a y. That instance may sometimes be
a class, since a class is an object.

But to say
Array.is_a? Enumerable # false
is very different from saying
[1,2,3].is_a? Enumerable # true

Have I redeemed myself a little? :)

Hal





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise