I would agree with a way/method to convert string-keys into symbol-keys.
I have no idea if this should be Hash#symbolize_keys or another name - perhaps
#transform_keys and allow either to_string or to_symbol conversion - but I
agree with a convenience method that could turn keys into one or the other.
Perhaps this would also reduce the need for strange things such as
HashWithIndifferentAccess. Newcomers will always wonder whether they should
use strings or symbols (or even worse, both at the same time in the same
hash).
Perhaps this would also reduce the need for strange things such as
HashWithIndifferentAccess. Newcomers will always wonder whether they should
use strings or symbols (or even worse, both at the same time in the same
hash).
First of all, why do you want to access them indifferently?
It just sounds a diabolical habit, to me.