aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-25 17:46:54 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-05-25 17:46:54 -0300
commit85c56b018fc7a693acbf265db871a9d96b537a86 (patch)
tree76802f043fdfcf33d594fe04d4279efad5292c45
parent0777773389955cd4c42759d66ce531fd2af7cf63 (diff)
parent1d485d51f8cd6e122a66d754f95918d378a9bb33 (diff)
downloadrails-85c56b018fc7a693acbf265db871a9d96b537a86.tar.gz
rails-85c56b018fc7a693acbf265db871a9d96b537a86.tar.bz2
rails-85c56b018fc7a693acbf265db871a9d96b537a86.zip
Merge pull request #6493 from markmcspadden/hash_keys_order_methods
Reorder deep_symbolize_keys methods
-rw-r--r--activesupport/lib/active_support/core_ext/hash/keys.rb14
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