Charles Nutter wrote:
>>> Does ruby_parser work on 1.9?
>>>
>>
>> Yeah it does but you need to pass it ruby source code not live objects.
> 
> That's how Ripper works too. Notice in this example:
> 
> require 'ripper'
>  require 'pp'
> 
>  pp Ripper.sexp %{
>    def foo
>      :bar
>    end
>  }
> 
> The %{ .. } is a string.

I think that's the point :-) You *have* to pass it a String source for 
it to parse. You can't take an object which Ruby has already parsed and 
installed, such as method(:foo) in this case, and get the sexp from the 
object.
-- 
Posted via http://www.ruby-forum.com/.