It works for me (Ruby 1.9.2 and 1.9.3) only if the second class declaration is inherited from Object. Any other MI attempt throws TypeError.
Also, it does not change the inheritance of the class. So, it MyTest.superclassremains Testeven afterclass MyTest < Object
, , Object superclass . docs:
new(super_class=Object) → a_class
, Object superclass, , , Object .