From: William Djaja Tjokroaminata Date: 2002-11-27T09:48:49+09:00 Subject: Re: The names of a method Klaus Fabritius wrote: > Hello! > I want do do something like that: > def foo > puts the_name_the_method_was_called_with > end ; alias bar foo > foo => "foo" > bar => "bar" > Is there a thing like the_name_the_method_was_called_with? Hi, I think this has been asked in the past; for example, see the thread starting at http://www.ruby-talk.org/38976. One of the answers (by Matz) is to extract it from 'caller(0)'. Regards, Bill