diff options
author | Mark McSpadden <markmcspadden@gmail.com> | 2012-05-25 15:29:01 -0500 |
---|---|---|
committer | Mark McSpadden <markmcspadden@gmail.com> | 2012-05-25 15:29:01 -0500 |
commit | 1d485d51f8cd6e122a66d754f95918d378a9bb33 (patch) | |
tree | 76802f043fdfcf33d594fe04d4279efad5292c45 /activesupport/lib | |
parent | 0777773389955cd4c42759d66ce531fd2af7cf63 (diff) | |
download | rails-1d485d51f8cd6e122a66d754f95918d378a9bb33.tar.gz rails-1d485d51f8cd6e122a66d754f95918d378a9bb33.tar.bz2 rails-1d485d51f8cd6e122a66d754f95918d378a9bb33.zip |
Reorder deep_symbolize_keys methods
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/keys.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb index 362d584ba1..e5e77bcef4 100644 --- a/activesupport/lib/active_support/core_ext/hash/keys.rb +++ b/activesupport/lib/active_support/core_ext/hash/keys.rb @@ -104,17 +104,17 @@ class Hash deep_transform_keys!{ |key| key.to_s } end - # Destructively convert all keys to symbols, as long as they respond - # to +to_sym+. This includes the keys from the root hash and from all - # nested hashes. - def deep_symbolize_keys! - deep_transform_keys!{ |key| key.to_sym rescue key } - end - # Return a new hash with all keys converted to symbols, as long as # they respond to +to_sym+. This includes the keys from the root hash # and from all nested hashes. def deep_symbolize_keys deep_transform_keys{ |key| key.to_sym rescue key } end + + # Destructively convert all keys to symbols, as long as they respond + # to +to_sym+. This includes the keys from the root hash and from all + # nested hashes. + def deep_symbolize_keys! + deep_transform_keys!{ |key| key.to_sym rescue key } + end end |