Roger Pack wrote:
>> I've been looking (on and off) for the past several months for a way to
>> accomplish this topic's namesake. There are many gems for Ruby 1.8x and
>> a few that even support earlier previews of 1.9.1, but I haven't found
>> any that support the current version (1.9.2) or even the official 1.9.1
>> release.
> 
> Currently there's no way to get the nodes of methods with 1.9.{1,2}
> It might be added in 1.9.3
> You can get to the code by using Method#source_location at times, then 
> re-parse.
> GL!
> -r

That's what I suspected, but was hoping I'd just missed something. :(

Any idea what the actual likelihood is of this finding its way into 
1.9.3? As mentioned, I'd hate to write code that can't be brought in 
line with the latest release.

Thanks for the help, and also for pointing out Method#source_location. 
Maybe I can use RubyNode or some such for 1.8, and fall back to 
#source_location in 1.9.x. Not ideal, but better than nothing!

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