eT Ma wrote in post #988662:
> Reviving thread again: I'd use __method__
>
> In terms of original example.
>
> def test_method
>   puts __method__
> end
>
> Maybe __method__ didn't exist in 2006 (too lazy to check, maybe its
>>=1.8.7), in 2010 it definitely did ;-)

I'm writing plugins for SketchUp which uses Ruby 1.8.6. __method__ does 
not exist there.

Using caller does give me the name of the calling method, but there is 
no reference to what module or class that method belonged to. Is that 
possible to obtain?

-- 
Posted via http://www.ruby-forum.com/.