class A end class B end class Y < A end class Y < B # TypeError: superclass mismatch for Y end Is there a way to get the class the raises the superclass mismatch? I would like to know that it is class Y that causes it and hold that class in my bare variables.