Skip to content

Instantly share code, notes, and snippets.

@fifitrixabelle
Created June 18, 2013 09:04
Show Gist options
  • Save fifitrixabelle/5803823 to your computer and use it in GitHub Desktop.
Save fifitrixabelle/5803823 to your computer and use it in GitHub Desktop.
Autovivify hash
hash = Hash.new{ |h,k| h[k] = Hash.new(&h.default_proc) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment