# \[ANN\] ruby\_parser 3.7.3 Released

**URL:** <https://rubytalk.org/t/ann-ruby-parser-3-7-3-released/73415>\
**Category:** ruby-talk\
**Created:** [22 January 2016 00:22 UTC](https://rubytalk.org/t/ann-ruby-parser-3-7-3-released/73415 "2016-01-22T00:22:46Z")\
**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:** [22 January 2016 00:22 UTC](https://rubytalk.org/t/ann-ruby-parser-3-7-3-released/73415/1 "2016-01-22T00:22:46Z")

</div>

ruby\_parser version 3.7.3 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.7.3 / 2016-01-21

\* 2 bug fixes:

&nbsp;&nbsp;\* Fixed parsing kwargs in defs with no parens. (presidentbeef)  
&nbsp;&nbsp;\* defs should have a nil node if body is empty.
