Actions
Feature #11761
closed`Hash#default_set` and `Hash#default_proc_set`
Feature #11761:
`Hash#default_set` and `Hash#default_proc_set`
Status:
Rejected
Assignee:
-
Target version:
-
Description
I often want to assign a default value or proc to an existing hash h and chain method after it. The way I do it is:
It would be convenient if I can assign them to a hash directly, and Hash#default= and Hash#default_proc= are close to doing that, but they are actually not useful because the return value is not the receiver hash:
I wish there were methods Hash#default_set and Hash#default_proc_set that return the receiver hash:
Actions