Actions
Feature #19607
openIntroduce `Hash#symbolize_keys`.
Status:
Open
Assignee:
-
Target version:
-
Description
This is a very common operation.
It can currently be implemented using Hash#transform_keys(&:to_sym)
.
It's currently provided by Rails as Hash#symbolize_keys
and Hash#symbolize_keys!
.
Proposed implementation is identical to Rails implementation: https://github.com/rails/rails/blob/539144d2d61770dab66c8643e744441e52538e09/activesupport/lib/active_support/core_ext/hash/keys.rb#L20-L37
For completeness we could also consider adding stringify_keys
but I think that's less frequently used.
Actions
Like1
Like0Like0Like0Like1Like0Like0Like0Like1