At first glance I thought BasicObject just “lays” the Class (read: Class inherits from BasicObject)
Class.ancestors #=> [Class, Module, Object, Kernel, BasicObject]
Module.ancestors #=> [Module, Object, Kernel, BasicObject]
Object.ancestors #=> [Object, Kernel, BasicObject]
BasicObject.ancestors #=>[BasicObject]
But things suddenly became quite curious.
Class.class #=> Class
Module.class #=> Class
Object.class #=> Class
BasicObject.class #=> Class
“Aha! I thought. “We’re really making an instance of Class: BasicObject = Class.new. But then I remembered that all these instances sit in a hierarchy with Class at the bottom: Class < Module < Object < Kernel < BasicObject.
Each of these classes are simultaneously objects. In turn, system seems highly circular. Where hierarchy begin and how does it blend with itself to form the abstract constructs of Ruby?
In Ruby, everything is an Object (< BasicObject), and so is class. A class is an object of class Class. An object of class Object is not necessarilly a class. However, class Object is a Class, necessarilly, and so is class BasicObject. Understood? No? Let’s move on. (As Matz says in his intro :)))
(In other words, you got it right.)