Question: First, let's add a method to retrieve eigenclass "copied from [this blog post](http://madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html)"

```
class Object 
  def eigenclass 
    class << self
      self
    end 
  end 
end

```

Then create a simple class

```
class A
end

puts A.new.eigenclass.superclass      # => A
puts Class.new.eigenclass.superclass  # => #<Class:Object>

```

I was expecting the second puts to output *Class*

Any clue why this happened?

Answer: 
By `puts A.new.eigenclass.superclass`, you are effectively calling `#eigenclass` on the *instance* of class A. I will begin with backstory to explain how eigenclass actually works, and will then proceed to tell what is happening in your code.

**BackStory:**

**EigenClass** is a hidden class which contains the singleton methods available for that *specific* object only. 

So for `obj = Foo.new`, the class hierarchy actually looks like:

> 
> obj --eigenclass--> #> --(superclass)--> A
> 
> 
> 

instead of:

> 
> obj --(class)--> A
> 
> 
> 

A hidden class can be produced after you hijacked the **self** with `#eigenclass`. 

Now, in Ruby, **Class** is an object. This also means that `#eigenclass` should show the the hidden eigenclass of `A` too (where A's sigleton methods are kept).

> 
> A --(eigenclass)--> # --(superclass)--> #
> 
> 
> 

Now the reason why it shows *#* instead of `A` is because Ruby organizes the classes, superclasses and eigenclasses in a very beautiful pattern. This can be shown with example instead of quoting it in confusing words:

```
A.superclass #=> Object   
A.eigenclass #=> #<Class: A>   
A.eigenclass.superclass #=> #<Class: Object> => Eigenclass of Object   
A.eigenclass.superclass == Object.eigenclass #=> true   

```

The **superclass of an eigenclass** of a *class* is the eigenclass of the superclass of the original *class*. 

Now, coming to your case: `Class.new.eigenclass.superclass`, this is self-explanatory now. `Class.new` corresponds to a new anonymous class, say `B`, and you are effectively calling `eigenclass.superclass` on it. Since the superclass of `B` is Object, the superclass of eigenclass of B is the eigenclass of superclass of `B`. 

Tried my best to explain with examples. Please feel free to clarify it further in comments below; will update the answer accordingly. Complementary(from Pragmatic MR): ![Shot from Pragmatic MR](https://i.stack.imgur.com/erhc2.png).

In the figure shown above, `D` inherits from `C`. So `D.eigenclass.superclass` is the eigneclass of (superclass of D)[which is C]. Now C's superclass is Object.. and so is the same logic.

Regards
A class's eigenclass has a whole shadow hierarchy of eigenclasses for the class's ancestors that all go between the eigenclass and Class. This is because classes are expected to inherit their ancestors' class methods. For example, if you did `def Numeric.kind_of_number?() true end`, you would expect `Fixnum.kind_of_number?` to be true. So you need to have Numeric's eigenclass as an ancestor of Fixnum's eigenclass.