Skip to content

Commit 808592b

Browse files
Use map! instead of replace + map
1 parent 8c07696 commit 808592b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activesupport/lib/active_support/hash_with_indifferent_access.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def convert_value(value)
165165
value.nested_under_indifferent_access
166166
elsif value.is_a?(Array)
167167
value = value.dup if value.frozen?
168-
value.replace(value.map { |e| convert_value(e) })
168+
value.map! { |e| convert_value(e) }
169169
else
170170
value
171171
end

0 commit comments

Comments
 (0)