Skip to content

Instantly share code, notes, and snippets.

@enebo
Created January 16, 2013 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enebo/4548938 to your computer and use it in GitHub Desktop.
Save enebo/4548938 to your computer and use it in GitHub Desktop.
Column is not hooked up yet and many things are missing but this is first nearly working ripper example for JRuby.
system ~/work/jruby ripper * 935% jruby -e 'require "ripper"; require "pp"; pp Ripper::SexpBuilder.new("1 + 2").parse'
jruby -e 'require "ripper"; require "pp"; pp Ripper::SexpBuilder.new("1 + 2").parse'
[:program,
[:stmts_add,
[:stmts_new],
[:binary, [:@int, "1", [1, 0]], :+, [:@int, "2", [1, 0]]]]]
system ~/work/jruby ripper * 936% mri19 -e 'require "ripper"; require "pp"; pp Ripper::SexpBuilder.new("1 + 2").parse'
mri19 -e 'require "ripper"; require "pp"; pp Ripper::SexpBuilder.new("1 + 2").parse'
[:program,
[:stmts_add,
[:stmts_new],
[:binary, [:@int, "1", [1, 0]], :+, [:@int, "2", [1, 4]]]]]
@headius
Copy link

headius commented Jan 16, 2013

👍

@lsegal
Copy link

lsegal commented Jan 16, 2013

This is big. 👍

@yorickpeterse
Copy link

I think it's time for me to stock up some beer to keep the promise of sending it in case Ripper support would be added to JRuby.

@bbatsov
Copy link

bbatsov commented May 3, 2013

When is this expected to hit GA JRuby?

@prathamesh-sonpatki
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment