diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-29 21:27:09 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-04-29 21:27:09 -0700 |
commit | 363d7ee55176e692bc031dcf0dc7f9f6e359abd6 (patch) | |
tree | 73584ce406b801b7edb2a146a8732cfbe97ba8de /activerecord/lib/active_record | |
parent | ed7ea66dbb0aaf9e16c87b51d2d0044d827b4af3 (diff) | |
parent | d56f5c8db7e937cabd07ff192c386f2aefed33a4 (diff) | |
download | rails-363d7ee55176e692bc031dcf0dc7f9f6e359abd6.tar.gz rails-363d7ee55176e692bc031dcf0dc7f9f6e359abd6.tar.bz2 rails-363d7ee55176e692bc031dcf0dc7f9f6e359abd6.zip |
Merge pull request #6074 from mark-rushakoff/unused-variables
Remove some unused variable assignments
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb | 8 |
1 files changed, 3 insertions, 5 deletions
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 |