On Wed, Apr 04, 2007 at 10:19:47PM +0900, Jamal Soueidan wrote: > > Indeed, if a has not been given a value yet, it cannot be "nil" ("nil" > > *is* a value, and an object), so this will fail. > > That made me confused a little bit, How can nil be a class? and then a > method in object base class (nil?) nil is an instance (the only instance) of class NilClass. irb(main):001:0> nil.class => NilClass irb(main):002:0> nil.class.ancestors => [NilClass, Object, Kernel]