From d56f5c8db7e937cabd07ff192c386f2aefed33a4 Mon Sep 17 00:00:00 2001 From: Mark Rushakoff Date: Sun, 29 Apr 2012 10:33:35 -0700 Subject: Remove unused assignments --- .../active_record/connection_adapters/abstract/connection_pool.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'activerecord/lib/active_record') 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 a609867898..46c7fc71ac 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -286,12 +286,10 @@ module ActiveRecord private def release(conn) - thread_id = nil - - if @reserved_connections[current_connection_id] == conn - thread_id = current_connection_id + thread_id = if @reserved_connections[current_connection_id] == conn + current_connection_id else - thread_id = @reserved_connections.keys.find { |k| + @reserved_connections.keys.find { |k| @reserved_connections[k] == conn } end -- cgit v1.2.3