From: Eero Saynatkari Date: 2006-08-18T02:59:25+09:00 Subject: Re: How to - Get method's name? Henry Savr wrote: > Dear Ruby gurus: > > How to get the method's name inside itself. For example to send it to > Error Processor Can you describe a situation where you have access to modify what a method does but not its name? I know it IS possible but rather unusual. Ruby's exception handling will provide you with the method name already. You could also do something like this: class Object def method_name() # Use Kernel.caller and some string manipulation here end end class Foo def foo puts "My name is #{self.method_name}!" end end I just do not see why this would be necessary. > Thank you, > Henry -- Posted via http://www.ruby-forum.com/.