From: Ryan Davis Date: 2007-08-02T05:07:08+09:00 Subject: Re: [ANN] ParseTree 2.0.0 Released On Aug 1, 2007, at 12:55 , Pit Capitain wrote: > 2007/8/1, Ryan Davis : >> ParseTree version 2.0.0 has been released! >> (...) > > Ryan, thank you for your continuous work on those libraries. I have a > question concerning Ruby's ASTs: do you know a way to get at the parse > tree of the calling method / block and at the node of the call? For > example: > > def look_at_callers_parse_tree > # what to do here? > end > > def calling_from_method > look_at_callers_parse_tree # should get this node... > end > > def calling_from_block > yield > end > > calling_from_block { look_at_callers_parse_tree } # ...and the one > in this block not without doing the usual caller() manipulation stuffs, no. Rubinius might be easier in that regard tho.