From: nobu.nokada@... Date: 2002-09-21T11:01:12+09:00 Subject: Re: RFC: Need a better caller(n) - real reflection for call stack wanted Hi, At Sat, 21 Sep 2002 03:45:02 +0900, Ryan King wrote: > Another thing, and this may not only be off-the-wall but also > YAGNI in the highest, but I've often wanted caller(-1). > > That's right folks: An object that represents the current method > invocation. > > One example of the potential is caller(-1).variables, which could > return a hash representing all the local variables. It sounds like as local_variables. > Then, we'd have the ability to mechanically extract methods, for > free. > > But maybe we don't need that because we never leave our code to > get so poorly factored that we'd need something like this. It doesn't feel to me useful, nor "factored." -- Nobu Nakada