@@ -292,7 +292,7 @@ def collections_info(coll_name=nil)
292292 result = self . command ( cmd , :cursor => { } )
293293 if result . key? ( 'cursor' )
294294 cursor_info = result [ 'cursor' ]
295- pinned_pool = @connection . pinned_pool
295+ pinned_pool = @client . pinned_pool
296296 pinned_pool = pinned_pool [ :pool ] if pinned_pool . respond_to? ( :keys )
297297
298298 seed = {
@@ -302,7 +302,7 @@ def collections_info(coll_name=nil)
302302 :ns => cursor_info [ 'ns' ]
303303 }
304304
305- Cursor . new ( self , seed . merge! ( opts ) ) . collect { | doc | doc [ 'collections' ] }
305+ Cursor . new ( Collection . new ( '$cmd' , self ) , seed ) . to_a
306306 else
307307 result [ 'collections' ]
308308 end
@@ -512,7 +512,7 @@ def index_information(collection_name)
512512 result = self . command ( { :listIndexes => collection_name } , :cursor => { } )
513513 if result . key? ( 'cursor' )
514514 cursor_info = result [ 'cursor' ]
515- pinned_pool = @connection . pinned_pool
515+ pinned_pool = @client . pinned_pool
516516 pinned_pool = pinned_pool [ :pool ] if pinned_pool . respond_to? ( :keys )
517517
518518 seed = {
@@ -522,7 +522,7 @@ def index_information(collection_name)
522522 :ns => cursor_info [ 'ns' ]
523523 }
524524
525- indexes = Cursor . new ( self , seed . merge! ( opts ) ) . collect { | doc | doc [ 'indexes' ] }
525+ indexes = Cursor . new ( Collection . new ( '$cmd' , self ) , seed ) . to_a
526526 else
527527 indexes = result [ 'indexes' ]
528528 end
0 commit comments