only this causes a rather crazy situations where
h["elad"]["adam"]["hungry"] = "always" h["elad"]["adam"]["hungry"] # => nil
another approach would be:
class NestedHash < Hash def initialize(*args) inner_hash = lambda {|h,k| h[k] = Hash.new &inner_hash } super(*args, &inner_hash) end end
only this causes a rather crazy situations where
another approach would be: