Skip to content

Instantly share code, notes, and snippets.

@bluekeys
Created March 25, 2011 19:46
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 bluekeys/887503 to your computer and use it in GitHub Desktop.
Save bluekeys/887503 to your computer and use it in GitHub Desktop.
A contrived JRuby example
require 'java'
list = java.util.ArrayList.new
os = java.lang.System.get_property 'os.name'
home = java.lang.System.get_property 'java.home'
mem = java.lang.Runtime.get_runtime.free_memory
list << os
list << home
list << mem
list.each do |item|
puts "#{item}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment