From: Ara.T.Howard@... Date: 2004-09-28T09:34:23+09:00 Subject: Re: Best name for "this method" ? On Tue, 28 Sep 2004, trans. (T. Onoma) wrote: > Wondering what the conscensus is on the best name for "this method". Right now > I'm using #calling, taking after #binding, but I'm not so sure about it. I've > also considered #this or #thus, to be more along the lines of 'self'. > > # Returns the current method or method name > def calling(firstclass=false) > m = /\`([^\']+)\'/.match(caller(1).first)[1] > return ( firstclass ? method( m ) : m.intern ) > end > > Also, will a method like this be implemented in future Ruby? > > Thanks, > T. in C this is known as __FUNCTION__. so perhaps 'function'. this could be o.k. if it were a method of Binding => Binding#function also useful would be Binding#functions to return a list of the call stack function names -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================