Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- irb:11:26:09:023 > x = [ :a, :b, :c ].map { |key| { key => Hash.new([]) } }.reduce :merge
- => {:a=>{}, :b=>{}, :c=>{}}
- irb:11:26:49:024 > x[:a]
- => {}
- irb:11:26:54:025 > x[:a][:bloo] << :blah
- => [:blah]
- irb:11:27:04:026 > x
- => {:a=>{}, :b=>{}, :c=>{}}
- irb:11:27:06:027 > x[:a]
- => {}
- irb:11:27:08:028 > x[:a][:bloo]
- => [:blah]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement