From: Paul Brannan Date: 2002-04-25T11:24:45+09:00 Subject: Re: outputting method name On Thu, Apr 25, 2002 at 10:08:29AM +0900, Norman Makoto Su wrote: > Is there a way to output the current method's name? for example, No, not really, but you can fake it using: http://rm-f.net/~cout/ruby/treasures/RubyTreasures-0.4/lib/hacks/call_stack.rb.html E.g.: require 'rbt/hacks/call_stack' def foo p caller_func(-1) end foo() #=> :foo Be forewarned that using the call stack will dramatically hinder performance. Paul