On Jan 20, 2007, at 11:45 AM, Wolfgang NŠŇasi-Donner wrote:
> "Method#origin" returns the object_id of the class where the method  
> belongs too. Thats clear for me.

No. the return value isn't the object_id (a Fixnum).  It is a  
reference to the class/module itself.  Same idea with Kernel#origin

This is the same pattern as with Kernel#class:

a = Hash.new
a.object_id	# a Fixnum
a.class		# reference to Hash, i.e. the class itself

b = a.class.new	# a newly created instance of Hash

m = Hash.method('invert')  # an instance of Method
m.origin	# a reference to Hash

h = m.origin.new # another instance of Hash is created


Gary Wright