Skip to content

Instantly share code, notes, and snippets.

@langsharpe
Created March 2, 2011 10:01
Show Gist options
  • Save langsharpe/850719 to your computer and use it in GitHub Desktop.
Save langsharpe/850719 to your computer and use it in GitHub Desktop.
Ruby example of array order
a = Array.new
a[1] = 'one'
a[0] = 'zero'
a.each do |value|
puts value
end
lang@virtualbox1:~/arrays$ ruby array.rb
zero
one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment