From: Ryan Davis Date: 2010-09-04T09:50:53+09:00 Subject: Re: Getting name of current method On Sep 3, 2010, at 17:44 , Ralph Shnelvar wrote: > Ruby has __FILE__ and __LINE__ to give the file and line omber where we are currently at in the code. > > Consider > Class X > def my_method > m = ??? # I want m to be assigned "my_method" > end > end > > How can I get m set properly? > > I guess I could use define_method to define my_method and then pass the name into the function .. but that is so ugly and also flattens scope that I may not want flattened. `ri Kernel.caller`