aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/keys.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/keys.rb')
-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