ruby_to_c
Translate static ruby subset to C
ruby_to_c translates a static subset of ruby to either ANSI or ruby C.
1 2 3 4 5 |
require 'ruby_parser' require 'ruby_to_ruby_c' sexp = RubyParser.new.parse '1 + 1' c = RubyToRubyC.new.process sexp |
Do not use this in production. That’s just crazy.
Get The Code
If you just want to use ruby_to_c, you can install it via RubyGems:gem install ruby_to_c
If you want to hack on ruby_to_c, clone it from GitHub:
git clone git://github.com/seattlerb/ruby_to_c