>         sample = [1,2,3]
>         p sample.class                          #=> Array
>         p sample.class.is_a?(Array)             #=> false

Sure. sample.class is Array and Array.class is Class.
Sample.class.is_a? (Array) means mostly the same as "is the class of
sample.class Array?". Becaue class of the sample.class is Array not
Class you get false here.

But: sample.is_a? (Array) #=> true

>         p sample.class.is_a?(Array.class)       #=> true   (why???)

Class is Class.

I guess you need to understand the difference between sample.is_a? and
sample.class.is_a?


Regards,
Rimantas
--
http://rimantas.com/