# Ruby2c 1.0.0.6 Released

**URL:** <https://www.ruby-forum.com/t/ruby2c-1-0-0-6-released/170915>\
**Category:** Ruby\
**Created:** [June 24, 2009, 4:37am UTC](https://www.ruby-forum.com/t/ruby2c-1-0-0-6-released/170915 "2009-06-24T04:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aguynamedryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/43a26b/32.png) [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Post date:** [June 24, 2009, 4:37am UTC](https://www.ruby-forum.com/t/ruby2c-1-0-0-6-released/170915/1 "2009-06-24T04:37:42Z")

</div>

ruby2c version 1.0.0.6 has been released!

- [http://rubyforge.org/projects/ruby2c/](http://rubyforge.org/projects/ruby2c/)
- [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
- \<removed\_email\_address@domain.invalid - mailing list\>

ruby\_to\_c translates a static ruby subset to C. Hopefully it works.

NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE

```
                 THIS IS BETA SOFTWARE!

```

NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE ! NOTE

RubyToC has the following modules:

- Rewriter - massages the sexp into a more consistent form.
- TypeChecker - type inferencer for the above sexps.
- RubyToRubyC - converts a ruby (subset) sexp to ruby interals C.
- RubyToAnsiC - converts a ruby (subset) sexp to ANSI C.

and the following tools:

- translate.rb - Translates a given file to C.

Changes:

### 1.0.0.6 / 2009-06-23

1 major enhancement:

- Switched from ParseTree to ruby\_parser for 1.9 compatibility. woo.
  - All translate/process methods are gone since we can’t reflect at  
runtime.

43 minor enhancements:

- Added IterRewriter for finding free variables in iter nodes.

- Added dxstr.

- Added lots of new and missing tests

- Added not, array, lit\_long\_negative, lit\_range[23],  
lit\_regexp{\_n,\_once}, lit\_sym{,\_splat}

- Added pct\_w tests

- Added process\_defx to ruby\_to\_ansi\_c.rb

- Added test data for array\_pct\_W, array\_pct\_W\_dstr,  
attrasgn\_index\_equals, attrasgn\_index\_equals\_space, and attrset.

- Added tests for “and”. PONG to eric

- Added to\_ary and masgn for TypeChecker.

- Added xstr support.

- Added yield(\*ary)

- Cleaned up rewriter.rb and made changes for pt\_testcase.rb

- Cleaned up some free\_vars processing code.

- Converted everything to new enhanced PTTC test scheme.

- Enhanced with\_scope to allow for static arrays.

- Extended Environment to separately store both types and values.

- Extern methods to support rb\_iterate, including #each and  
#each\_with\_index.

- Free var static declarations for C layers.

- Merged IterRewriter into CRewriter and make typed.

- Migrated as much out of rewriter as possible.

- Modernized via hoe.

- Moved to full PTTC + UnifiedRuby.

- Pulled dstr up from ZenObfuscator.

- Pulled up tests, process\_args, with\_scope, and process\_scope from  
obfuscator

- Pushed unique.rb up to PT

- Removed Environment methods that pushed up to ruby\_parser.

- Removed Sexp#sexp\_type

- Removed accessor, accessor\_equals since they don’t exist in PTTC.

- Removed bin/\*

- Removed dead test

- Removed redundant defn\_lvar\_boundary, but added call to  
lvar\_def\_boundary.

- Renamed blocks to extra\_methods in ruby\_to\_ruby\_c.

- Renamed environment.rb to r2cenvironment.rb (incl tests)

- Renamed iter\_functions to extra\_methods in crewriter.

- Reordered so RubyToRubyC was always after RubyToAnsiC.

- Some optimizations cleaning up Type#method\_missing. Drops test time  
~30%.

- Split rewriter.rb to crewriter.rb (and renamed class to CRewriter).

- Split up and deleted support.rb (and tests).

- Switched from makefile to rakefile.

- Switched to minitest

- Test or node.

- Track and trigger changes on pt\_testcase.rb and r2ctestcase.rb

- Used Hoe#add\_include\_dirs to clean up rakefile.

- 12 bug fixes:
