lib/mongo/database/view.rb in mongo-2.15.1 vs lib/mongo/database/view.rb in mongo-2.16.0.alpha1

- old
+ new

@@ -66,10 +66,10 @@ session = client.send(:get_session, options) cursor = read_with_retry_cursor(session, ServerSelector.primary, self) do |server| send_initial_query(server, session, options.merge(name_only: true)) end cursor.map do |info| - if cursor.server.with_connection { |connection| connection.features }.list_collections_enabled? + if cursor.initial_result.connection_description.features.list_collections_enabled? info['name'] else (info['name'] && info['name'].sub("#{@database.name}.", '')) end