From 17f0509c29561691fb908292b9d9e48ab3d19fcc Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Wed, 21 Feb 2024 09:58:18 -0800 Subject: [PATCH] Make Database @transactions a compare by identity hash This is faster, and would fix a theoretical bug in the case where a driver implemented a connection object that could compare equal (hash/eql?) with another connection object. --- lib/sequel/database/misc.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/sequel/database/misc.rb b/lib/sequel/database/misc.rb index 3ebae3d3b..f77e051e2 100644 --- a/lib/sequel/database/misc.rb +++ b/lib/sequel/database/misc.rb @@ -149,6 +149,7 @@ def initialize(opts = OPTS) @schemas = {} @prepared_statements = {} @transactions = {} + @transactions.compare_by_identity @symbol_literal_cache = {} @timezone = nil