Permalink
Browse files

Use map! instead of replace + map

  • Loading branch information...
1 parent 8c07696 commit 808592bae2b83ced018f16d576d41a0059ed302a @carlosantoniodasilva carlosantoniodasilva committed Jun 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -165,7 +165,7 @@ def convert_value(value)
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

0 comments on commit 808592b

Please sign in to comment.