Hash value inheritance
If value in the hash below is nil, lookup will happen against other hash
myhash = Hash.new {|hash, key| hash[key] = OTHER_HASH[key]}
Written by Stevenson Jean-Pierre
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors