ParseTree 3.0.9 Released

ParseTree version 3.0.9 has been released!

ParseTree is a C extension (using RubyInline) that extracts the parse
tree for an entire class or a specific method and returns it as a
s-expression (aka sexp) using ruby’s arrays, strings, symbols, and

As an example:

def conditional1(arg1)
if arg1 == 0 then
return 1
return 0


[:args, :arg1],
[:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]],
[:return, [:lit, 1]],
[:return, [:lit, 0]]]]]


3.0.9 / 2012-05-01

  • 6 minor enhancements:

    • Added a bunch of new tests from PTTC.
    • Added masgn handling inside block_pass
    • Added rewrite_iter to unwrap masgns w/ only 1 arg.
    • Handle rewriting block_pass in iter.
    • Imported RawParseTree test data from PTTC.
    • Removed rewrite_masgn requirement for 4 slots.
  • 3 bug fixes:

    • Fixed dependencies to ensure they’re not going to use ruby_parser 3
      and friends.
    • Fixed segv for NODE_BLOCK_PASS in iter (nd_iter == 1… go boom)
    • Remove nil body in iter (I think this is wrong, but whatevs).