From: Ronald Fischer Date: 2007-07-16T23:56:16+09:00 Subject: Accessing the name of the current function Is there away to access the name of the currently defined function? Example: Right now I do tracing like this: def myfunc(a,b) trace.debug "ENTER myfunc a=#{a} b=#{b}" .... trace.debug "LEAVE myfunc result=#{result}" result end If I rename myfunc, I also have to change the word myfunc in the trace statements. It would be convenient to have something like trace.debug "ENTER #{__function__} a=#{a} b=#{b}" Maybe Ruby already provides such a feature, and I just don't know it... Ronald -- Ronald Fischer Phone: +49-89-452133-162