提交 b4b32285 编写于 作者: M Matthew Draper

Merge pull request #15678 from sgrif/sg-test-hash

Add a test to ensure we don't get a performance regression on #hash
......@@ -1597,4 +1597,11 @@ def test_default_values_are_deeply_dupped
assert_equal after_handler, new_handler
assert_equal orig_handler, klass.connection_handler
end
# Note: This is a performance optimization for Array#uniq and Hash#[] with
# AR::Base objects. If the future has made this irrelevant, feel free to
# delete this.
test "records without an id have unique hashes" do
assert_not_equal Post.new.hash, Post.new.hash
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册