From: dblack@... Date: 2006-12-22T23:11:56+09:00 Subject: Re: class method Hi -- On Fri, 22 Dec 2006, Peter Szinek wrote: > >>> irb(main):005:0> a.class.is_a? A >>> => false >> this still confuses me! > > a 'is-an' A. you ask for this with > > a.is_a? A > > When you are asking > > a.class.is_a? A > > that actually means 'A.class is_a? A' which is not true since A.class is > Class. That's not quite right. a.class doesn't test A.class; it tests A. So this: a.class.is_a? A is the same as: A.is_a? A which is not true. David -- Q. What's a good holiday present for the serious Rails developer? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) aka The Ruby book for Rails developers! Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)