Ruby_parser 3.0.0.a10 Released

ruby_parser version 3.0.0.a10 has been released!

ruby_parser (RP) is a ruby parser written in pure ruby (utilizing
racc–which does by default use a C extension). RP’s output is
the same as ParseTree’s output: s-expressions using ruby’s arrays and
base types.

As an example:

def conditional1 arg1
return 1 if arg1 == 0
return 0


s(:defn, :conditional1, s(:args, :arg1),
s(:call, s(:lvar, :arg1), :==, s(:lit, 0)),
s(:return, s(:lit, 1)),
s(:return, s(:lit, 0)))


3.0.0.a10 / 2012-10-26

  • 1 major enhancement:

    • iter nodes are now structurally the same as defs. Block args are
      COMPLETELY different.
  • 4 minor enhancements:

    • 1.8 and 1.9 now treat f { |(…)| } differently, per MRI.
    • 1.9: Added ENCODING support. (witlessbird)
    • 1.9: Finished coverage for masgn variants in block args
    • 1.9: covered all forms of block args: optional, splat, block, and