Skip to content

Instantly share code, notes, and snippets.

@langsharpe
Created March 20, 2011 04:23
Show Gist options
  • Save langsharpe/878071 to your computer and use it in GitHub Desktop.
Save langsharpe/878071 to your computer and use it in GitHub Desktop.
Unordered Hash in Ruby 1.8
a = Hash.new
a['key1'] = 'one'
a['key0'] = 'zero'
a.each_value do |value|
puts value
end
lang@virtualbox1:~/$ ruby hash.rb
zero
one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment