From 808592bae2b83ced018f16d576d41a0059ed302a Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Mon, 18 Jun 2012 21:52:55 -0300 Subject: [PATCH] Use map! instead of replace + map --- .../lib/active_support/hash_with_indifferent_access.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ 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 -- GitLab