Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6493 from markmcspadden/hash_keys_order_methods

Reorder deep_symbolize_keys methods
  • Loading branch information...
commit 85c56b018fc7a693acbf265db871a9d96b537a86 2 parents 0777773 + 1d485d5
Rafael Mendonça França rafaelfranca authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 activesupport/lib/active_support/core_ext/hash/keys.rb
14 activesupport/lib/active_support/core_ext/hash/keys.rb
View
@@ -104,17 +104,17 @@ def deep_stringify_keys!
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
Please sign in to comment.
Something went wrong with that request. Please try again.