From d0f0ec9b7d8beb93085af4772e46d7ef60a73d47 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 20 Sep 2015 02:35:33 +0900 Subject: Remove `@connection` in `StatementPool` `@connection` in `StatementPool` is only used for PG adapter. No need for abstract `StatementPool` class. --- activerecord/lib/active_record/connection_adapters/statement_pool.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters/statement_pool.rb') diff --git a/activerecord/lib/active_record/connection_adapters/statement_pool.rb b/activerecord/lib/active_record/connection_adapters/statement_pool.rb index 82e9ef3d3d..57463dd749 100644 --- a/activerecord/lib/active_record/connection_adapters/statement_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/statement_pool.rb @@ -3,10 +3,9 @@ module ActiveRecord class StatementPool include Enumerable - def initialize(connection, max = 1000) + def initialize(max = 1000) @cache = Hash.new { |h,pid| h[pid] = {} } - @connection = connection - @max = max + @max = max end def each(&block) -- cgit v1.2.3