Skip to content

Instantly share code, notes, and snippets.

@danielevans
Created September 17, 2012 00:11
Show Gist options
  • Save danielevans/3734936 to your computer and use it in GitHub Desktop.
Save danielevans/3734936 to your computer and use it in GitHub Desktop.
(0..25).to_enum.reduce({}) do |memo,i|
memo[(i + 'a'.ord).chr] = i + 1
memo
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment