At Sat, 6 Jan 2001 01:19:21 +0900,
Mathieu Bouchard wrote:
> 
> > A number of users was confused by these behavior, thus we have already
> > proposed an alternative constructor [ruby-list:26622] like this:
> >   a = Hash.new { |hash_self, unknown_key| 
> >     hash_self[unknown_key] = ""
> >   }
> 
> What do you think of:
> 
> a = Hash.new
> def a.key_missing(key)
>   self[key] = ""
> end

I like it.

for the compatibility, the default Hash#key_missing should be

class Hash
  def key_missing(key)
    nil
  end
end

And my question is what functionality am I missing compare to
Hash@default and its accessors? (other than compatibility)
--
         yashi