Live_ast 1.0, now with transparent integration -- ParseTree for Ruby 1.9

http://quix.github.com/live_ast

Since its initial announcement, live_ast has acquired the ability to
(practically) fully emulate ParseTree for Ruby 1.9. The awkward
ast_eval stand-in for eval is no longer necessary.

The following now works on MRI and JRuby (and will work on Rubinius
when it implements more 1.9.2 features).

% gem install live_ast
% gem install boc

require ‘live_ast/full’

f = eval “lambda { ‘foo’ }”
p f.to_ast

=> s(:iter, s(:call, nil, :lambda, s(:arglist)), nil, s(:str,

“foo”))

IRB support has also been added.

live_ast continues to be a small project written in pure Ruby. The boc
extension gem is a recently-discovered loophole which enables eval to
be replaced. This must be done explicitly, however, and the default
continues to use just pure Ruby (ast_eval).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs