Skip to content

Commit 80bce4a

Browse files
authored
Merge pull request rails#50859 from rails/no-row-mutation
Don't mutate row arrays that come back from the database adapter
2 parents bb0e59b + 84130af commit 80bce4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/test/cases/finder_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,9 +1614,9 @@ def test_select_rows
16141614
[["1", "1", nil, "37signals"],
16151615
["2", "1", "2", "Summit"],
16161616
["3", "1", "1", "Microsoft"]],
1617-
Company.connection.select_rows("SELECT id, firm_id, client_of, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map! { |i| i.map! { |j| j.to_s unless j.nil? } })
1617+
Company.connection.select_rows("SELECT id, firm_id, client_of, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map { |i| i.map { |j| j.to_s unless j.nil? } })
16181618
assert_equal [["1", "37signals"], ["2", "Summit"], ["3", "Microsoft"]],
1619-
Company.connection.select_rows("SELECT id, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map! { |i| i.map! { |j| j.to_s unless j.nil? } }
1619+
Company.connection.select_rows("SELECT id, name FROM companies WHERE id IN (1,2,3) ORDER BY id").map { |i| i.map { |j| j.to_s unless j.nil? } }
16201620
end
16211621

16221622
def test_find_with_order_on_included_associations_with_construct_finder_sql_for_association_limiting_and_is_distinct

0 commit comments

Comments
 (0)