From: "trans. (T. Onoma)" Date: 2004-09-28T10:26:22+09:00 Subject: Re: Best name for "this method" ? On Monday 27 September 2004 08:49 pm, Florian Gross wrote: > JavaScript uses callee for the first-class version. > > > # Returns the current method or method name > > def calling(firstclass=false) > > m = /\`([^\']+)\'/.match(caller(1).first)[1] > > return ( firstclass ? method( m ) : m.intern ) > > end > > Personally, I'd dump the first-class logic and call it method_name. It > is easy enough to turn that into a Method anyway. Then what about #called for just the method name? def my_method p called end T.