Thursday, November 11, 2010

How to get the superclass of an object

I used to be able to call superclass directly, but not anymore, I don't know exactly with ruby version changed.   Now I need to make the call on from the class.

i.e.
obj.superclass <--  Not any more XXXXX

This is correct:
      obj.class.superclass

No comments:

Post a Comment