Skip to content

Instantly share code, notes, and snippets.

@TomTriple
Created October 21, 2011 16:13
Show Gist options
  • Save TomTriple/1304235 to your computer and use it in GitHub Desktop.
Save TomTriple/1304235 to your computer and use it in GitHub Desktop.
java <-> jruby
include Java
include_class "java.util.ArrayList"
list = ArrayList.new
block = Proc.new do
add "entry 1"
add "entry 2"
end
list.instance_eval &block
pp list.get(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment