diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-06-18 21:52:55 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-06-18 21:53:25 -0300 |
commit | 808592bae2b83ced018f16d576d41a0059ed302a (patch) | |
tree | 92fd560b75709595a3fa6591c5fe4689067d8227 /activesupport | |
parent | 8c07696f470cff823ad0b538ca4bea1594742580 (diff) | |
download | rails-808592bae2b83ced018f16d576d41a0059ed302a.tar.gz rails-808592bae2b83ced018f16d576d41a0059ed302a.tar.bz2 rails-808592bae2b83ced018f16d576d41a0059ed302a.zip |
Use map! instead of replace + map
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/hash_with_indifferent_access.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb index bb47b3560a..3e6c8893e9 100644 --- a/activesupport/lib/active_support/hash_with_indifferent_access.rb +++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb @@ -165,7 +165,7 @@ module ActiveSupport value.nested_under_indifferent_access elsif value.is_a?(Array) value = value.dup if value.frozen? - value.replace(value.map { |e| convert_value(e) }) + value.map! { |e| convert_value(e) } else value end |