1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use map! instead of replace + map

This commit is contained in:
Carlos Antonio da Silva 2012-06-18 21:52:55 -03:00
parent 8c07696f47
commit 808592bae2

View file

@ -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