In public methods key is typed as String, except for delete and has_key?. This will type key as String and adds deprecated method overloads that supports "any" key.
That any type was accepted as key in delete caused merge! with NamedTuple to break, because delete didn't delete old values because of a symbol-string comparison in delete always was false.
Since all methods except for delete and has_key? types key to String it's reasonable to do it in them as well.
In public methods
key
is typed asString
, except fordelete
andhas_key?
. This will typekey
asString
and adds deprecated method overloads that supports "any" key.That any type was accepted as key in
delete
causedmerge!
withNamedTuple
to break, becausedelete
didn't delete old values because of a symbol-string comparison indelete
always was false.Since all methods except for
delete
andhas_key?
typeskey
toString
it's reasonable to do it in them as well.