hsh.default_proc = proc_obj or nil
Instance Public methods
Sets the default proc to be executed on each failed key lookup.
h.default_proc = proc do |hash, key| hash[key] = key + key end h[2] #=> 4 h["cat"] #=> "catcat"
Sets the default proc to be executed on each failed key lookup.
h.default_proc = proc do |hash, key| hash[key] = key + key end h[2] #=> 4 h["cat"] #=> "catcat"
Please login to continue.