Spitfire schrieb:
> Gregor Kopp wrote:
> 
>>> sample = [1,2,3]
>>> p sample.class                #=> Array
>>> p sample.is_a?(Array)         #=> true
>>
>>
>> isa? makes checks with .class in the Background automagically.
> 
> so what is exactly happening when I type
>     sample.class.is_a?...
> 
> 

i think it does a check with samle.class.class in the Background wich 
results in Class

irb(main):001:0> class A
irb(main):002:1> end
=> nil
irb(main):003:0> a = A.new
=> #<A:0x2f8b4b4>
irb(main):004:0> a.class
=> A
irb(main):005:0> a.class.is_a? A
=> false
irb(main):006:0> a.class.class
=> Class
irb(main):007:0> A.class
=> Class