Skip to content

@graywh /gist:3439466
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Auto-creating nested hashes via recursive proc
hash = lambda { |h, k| h[k] = Hash.new &hash }
x = Hash.new &hash
x[1][2][3][4][5] = 6
x #=> {1=>{2=>{3=>{4=>{5=>6}}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.