Skip to content

Instantly share code, notes, and snippets.

@trshafer
Created May 13, 2010 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trshafer/400639 to your computer and use it in GitHub Desktop.
Save trshafer/400639 to your computer and use it in GitHub Desktop.
infinitely nested hashes
default = lambda { |h,k| h[k] = Hash.new(&default) }
top = Hash.new(&default)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment