Usually I can get a metaclass for a specific instance of a Ruby object with something like this:
class C def metaclass class << self; self; end end end
Say I just want to know the metaclass of an arbitrary instance of an obj object of an arbitrary class, and I don't want to define a metaclass method (or similar) for the obj class.
Is there any way to do this?
source share