aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorGordon Chan <developer.gordon+github@gmail.com>2014-07-31 12:12:32 +1200
committerGordon Chan <developer.gordon+github@gmail.com>2014-07-31 12:16:48 +1200
commitd952a7afc5ef5826f8b4e9c339bc6a5974c9fd3f (patch)
tree3dc737ed94001ff706e613b6383c05b35b3ac239 /activesupport/lib
parent74c31ac5fe44b2e2b46e660932e6ca266b11fd58 (diff)
downloadrails-d952a7afc5ef5826f8b4e9c339bc6a5974c9fd3f.tar.gz
rails-d952a7afc5ef5826f8b4e9c339bc6a5974c9fd3f.tar.bz2
rails-d952a7afc5ef5826f8b4e9c339bc6a5974c9fd3f.zip
Removed unnecessary call to 'convert_key' in 'HashWithIndifferentAccess#to_hash'
All the keys are already Strings by virtue of being a HashWithIndifferentAccess.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/hash_with_indifferent_access.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb
index dc76a77a6c..30e27267a0 100644
--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb
+++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -246,9 +246,9 @@ module ActiveSupport
# Convert to a regular hash with string keys.
def to_hash
- _new_hash= {}
+ _new_hash = {}
each do |key, value|
- _new_hash[convert_key(key)] = convert_value(value, for: :to_hash)
+ _new_hash[key] = convert_value(value, for: :to_hash)
end
Hash.new(default).merge!(_new_hash)
end