From: ara.t.howard@... Date: 2007-01-20T04:46:38+09:00 Subject: Re: Minor Change Proposal for Classes 'Object' and 'Method' On Sat, 20 Jan 2007, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Minor Change Proposal for Classes 'Object' and 'Method'" > on Sat, 20 Jan 2007 01:52:36 +0900, Yukihiro Matsumoto writes: > > |Why object_id? Isn't it more useful to return the receiver itself, > |e.g. > | > | myhi.receiver # => # > | > |? > > Wolfgang's proposal can be divided into three methods. > > #receiver that returns the bound object of the method object. > #name that returns the name of the method object. > and a method that returns the class which holds the method. > > Does anybody have good name candidate for the last one? I have > already implemented the first two methods in the local copy of the > repository. object.where? "method_name" # returns nil if not defined object.definer "method_name" # same as above another idea: m = object.def "method_name" # an uber-bound method object p m.name #=> "method_name" m.call *a, &b #=> same as object.method_name *a, &b kind regards. -a -- we can deny everything, except that we have the possibility of being better. simply reflect on that. - the dalai lama