From 269a184c1962e90edcca47515833cb7eef0aaa41 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Fri, 14 Aug 2020 12:12:29 -0400 Subject: [PATCH] Remove unnecessary `compact` Looking at the history this is holdover from the pre-pool manager and changes made by Shopify. The tests pass without it and we've had enough changes that it doesn't appear necessary anymore. Co-authored-by: John Crepezzi --- .../connection_adapters/abstract/connection_pool.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 4e36fc176d..70e48de940 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -1027,7 +1027,7 @@ def connection_pool_names # :nodoc: end def connection_pool_list - owner_to_pool_manager.values.compact.flat_map { |m| m.pool_configs.map(&:pool) } + owner_to_pool_manager.values.flat_map { |m| m.pool_configs.map(&:pool) } end alias :connection_pools :connection_pool_list -- GitLab