Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor tweak to retrieve_connection_pool -- recurse instead of loop

  • Loading branch information...
commit 300754509b6990b387b056c122e90f50a79eeb81 1 parent 113cc4e
@nicksieger nicksieger authored
View
10 activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -271,12 +271,10 @@ def remove_connection(klass)
end
def retrieve_connection_pool(klass)
- loop do
- pool = @connection_pools[klass.name]
- return pool if pool
- return nil if ActiveRecord::Base == klass
- klass = klass.superclass
- end
+ pool = @connection_pools[klass.name]
+ return pool if pool
+ return nil if ActiveRecord::Base == klass
+ retrieve_connection_pool klass.superclass
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.