# File lib/mongo/cursor.rb, line 142 def try_next if @documents.nil? @documents = process(@initial_result) # the documents here can be an empty array, hence # we may end up issuing a getMore in the first try_next call end if @documents.empty? if more? if exhausted? kill_cursors return nil end @documents = get_more end else # cursor is closed here # keep documents as an empty array end if @documents return @documents.shift end nil end