Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created March 5, 2012 23:09
Show Gist options
  • Save jbrechtel/1981875 to your computer and use it in GitHub Desktop.
Save jbrechtel/1981875 to your computer and use it in GitHub Desktop.
foo
def foo(nums)
h = Hash.new([])
nums.each { |n| h[n] << n }
puts nums.inspect
puts nums['foo']
end
#YETANOTHERREASONMUTABLESTATEISTERRIBLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment