From 1d485d51f8cd6e122a66d754f95918d378a9bb33 Mon Sep 17 00:00:00 2001 From: Mark McSpadden Date: Fri, 25 May 2012 15:29:01 -0500 Subject: Reorder deep_symbolize_keys methods --- activesupport/lib/active_support/core_ext/hash/keys.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'activesupport/lib/active_support') 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 -- cgit v1.2.3