# \[ANN\] ruby\_parser 3.6.6 Released

**URL:** <https://rubytalk.org/t/ann-ruby-parser-3-6-6-released/73000>\
**Category:** ruby-talk\
**Created:** [13 April 2015 22:29 UTC](https://rubytalk.org/t/ann-ruby-parser-3-6-6-released/73000 "2015-04-13T22:29:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Davis1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/ryan_davis1/32/1848_2.png) [@Ryan\_Davis1](https://rubytalk.org/u/Ryan_Davis1)\
**Post date:** [13 April 2015 22:29 UTC](https://rubytalk.org/t/ann-ruby-parser-3-6-6-released/73000/1 "2015-04-13T22:29:56Z")

</div>

ruby\_parser version 3.6.6 has been released!

\* home: \<[https://github.com/seattlerb/ruby\_parser](https://github.com/seattlerb/ruby_parser)\>  
\* bugs: \<[https://github.com/seattlerb/ruby\_parser/issues](https://github.com/seattlerb/ruby_parser/issues)\>  
\* rdoc: \<[http://docs.seattlerb.org/ruby\_parser](http://docs.seattlerb.org/ruby_parser)\>

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:

&nbsp;&nbsp;&nbsp;&nbsp;def conditional1 arg1  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 1 if arg1 == 0  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return 0  
&nbsp;&nbsp;&nbsp;&nbsp;end

becomes:

&nbsp;&nbsp;&nbsp;&nbsp;s(:defn, :conditional1, s(:args, :arg1),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s(:if,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s(:call, s(:lvar, :arg1), :==, s(:lit, 0)),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s(:return, s(:lit, 1)),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nil),  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s(:return, s(:lit, 0)))

Tested against 801,039 files from the latest of all rubygems (as of 2013-05):

\* 1.8 parser is at 99.9739% accuracy, 3.651 sigma  
\* 1.9 parser is at 99.9940% accuracy, 4.013 sigma  
\* 2.0 parser is at 99.9939% accuracy, 4.008 sigma

Changes:

### 3.6.6 / 2015-04-13

\* 1 minor enhancement:

&nbsp;&nbsp;\* Added expr\_labelarg state (eg: a:1)

\* 5 bug fixes:

&nbsp;&nbsp;\* Fix scan logging backtrace when DEBUG=1  
&nbsp;&nbsp;\* Fixed kwsplat on 2.0 & 2.1.  
&nbsp;&nbsp;\* Fixed mandatory keyword block args. (cvortmann)  
&nbsp;&nbsp;\* Handle #$\<x\> in expanded strings/regexps where x is NOT a valid gvar name.  
&nbsp;&nbsp;\* Invalid gvar names raise a compile error.
