Skip to content

Instantly share code, notes, and snippets.

@phiggins
Created February 23, 2012 17:46
Show Gist options
  • Save phiggins/1893991 to your computer and use it in GitHub Desktop.
Save phiggins/1893991 to your computer and use it in GitHub Desktop.
Ruby2Ruby
$ irb
rubinius-2.0.0dev :001 > some_code = "a = 123"
=> "a = 123"
rubinius-2.0.0dev :002 > some_code.to_sexp
=> [:lasgn, :a, [:lit, 123]]
rubinius-2.0.0dev :003 > require 'ruby2ruby'
=> true
rubinius-2.0.0dev :004 > Ruby2Ruby.new.process(some_code.to_sexp)
=> "a = 123"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment