Wolfgang NáÅasi-Donner wrote: > An additional method "Kernel#origin(name)" will be helpful, if the method is > defined as a singleton method for an object, it is difficult to get the > object_id of the anonymous class, where the method ist defined (I hope this > sentense is somehow understndable). Could you explain what you mean by this? I would assume that this would work: class Foo; def bar1; end; end f = Foo.new def f.bar2; end o1 = f.method( :bar1 ).owner o2 = f.eigenclass # class << f; self; end o3 = f.method( :bar2 ).owner p o1 == Foo #=> true p o2 == o3 #=> true The owner of an instance method should be the class on which it is defined, right? Thus, the owner of a 'singleton method' (eigenmethod(?)) would be the (anonymous/singleton/eigen) class. That would make it easy to get the object_id of that class for the such a method.