Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nue = lambda { |h,k| h[k] = Hash.new(&nue) }
- h = Hash.new(&nue)
- h[:a][:b][:c] = 'abc'
- h
- # => {:a=>{:b=>{:c=>"abc"}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement