diff options
author | Corprew Reed <github@corprew.org> | 2019-05-27 23:44:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-27 23:44:53 -0700 |
commit | 82ee7a0fa93e6f9ec69804734c8981217587dae5 (patch) | |
tree | a5ef62d7010aa4a0ce9972b664590b426bf3e6b0 /actionmailer/bin | |
parent | f09ca65e0f298b39feecf99347deaf2acd2acc10 (diff) | |
download | rails-82ee7a0fa93e6f9ec69804734c8981217587dae5.tar.gz rails-82ee7a0fa93e6f9ec69804734c8981217587dae5.tar.bz2 rails-82ee7a0fa93e6f9ec69804734c8981217587dae5.zip |
stringify_keys and symbolize_keys have stable results.
Rails 6 uses the `Hash.transform_keys` found in Ruby 2.5 and later, and that method enumerates keys based on insertion order. Calling `symbolize_keys`, `stringify_keys`, and their bang variants will result in the same hash every time -- the value for any key where a collision occurs is the last assigned in that enumeration
In the docs for Hash -- https://ruby-doc.org/core-2.5.0/Hash.html
> Hashes enumerate their values in the order that the corresponding keys were inserted.
Diffstat (limited to 'actionmailer/bin')
0 files changed, 0 insertions, 0 deletions