# \[ANN\] ruby\_parser 3.2.1 Released

**URL:** <https://rubytalk.org/t/ann-ruby-parser-3-2-1-released/68137>\
**Category:** ruby-talk\
**Created:** [3 July 2013 23:18 UTC](https://rubytalk.org/t/ann-ruby-parser-3-2-1-released/68137 "2013-07-03T23:18:48Z")\
**Posts on this page:** 2\
**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:** [3 July 2013 23:18 UTC](https://rubytalk.org/t/ann-ruby-parser-3-2-1-released/68137/1 "2013-07-03T23:18:48Z")

</div>

ruby\_parser version 3.2.1 has been released!

\* rdoc: \<[http://docs.seattlerb.org/ruby\_parser](http://docs.seattlerb.org/ruby_parser)\>  
\* bugs: \<[https://github.com/seattlerb/ruby\_parser/issues](https://github.com/seattlerb/ruby_parser/issues)\>  
\* home: \<[https://github.com/seattlerb/ruby\_parser](https://github.com/seattlerb/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.2.1 / 2013-07-03

\* 1 bug fix:

&nbsp;&nbsp;\* 1.9/2.0: Trailing assocs were being munged into arrays. (presidentbeef)

---

<div class="post-metadata">

**Author:** ![Kiswono\_Prayogo](https://avatars.discourse-cdn.com/v4/letter/k/ce7236/32.png) [@Kiswono\_Prayogo](https://rubytalk.org/u/Kiswono_Prayogo)\
**Post date:** [7 July 2013 17:15 UTC](https://rubytalk.org/t/ann-ruby-parser-3-2-1-released/68137/2 "2013-07-07T17:15:54Z")

</div>

Ruby is not doing well on TehcEmpower's Framework Benchmark

reference: [http://www.techempower.com/benchmarks/#section=data-r6&hw=i7&test=query](http://www.techempower.com/benchmarks/#section=data-r6&hw=i7&test=query)

fastest one was Sinatra (545 rps), still far from the top tier that could perform 5k+ rps (10 times better)

Best Regards,  
Kiswono P  
GB
