I've just got deeper in Ruby hierarchy to understand it. For example,
class Test
end
t = Test.new
So, if I want to get class of t I need to get 'class' property:
t.class # 'Test'
If I want to get parent of Test class I should use 'superclass' method:
t.class.superclass # BasicObject
But also Test is an instance of Class class. So, if I execute the following thing:
t.class.class # Class
So, I don't understand the difference between 'superclass' and 'class.class'; why aren't Class superclass for Test? What does it mean? Doest Test inherit methods of Class or BasicObject or both ones? Please, explain this thigns to me. I came from Java and I didn't hear about this features before. Thanks.