Skip to content

Instantly share code, notes, and snippets.

@cheeyeo
Last active December 20, 2015 15:48
Show Gist options
  • Save cheeyeo/6156380 to your computer and use it in GitHub Desktop.
Save cheeyeo/6156380 to your computer and use it in GitHub Desktop.
Ruby array to hash
tst=["GBP","USD","EUR"]
tst.each_with_object({}) do |item, memo|
memo[item] = item.downcase
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment