lib/mongo/collection/view/change_stream.rb in mongo-2.11.0.rc0 vs lib/mongo/collection/view/change_stream.rb in mongo-2.11.0

- old
+ new

@@ -294,10 +294,14 @@ spec[:selector][:aggregate] = 1 unless for_collection? end end def change_doc - { fullDocument: ( @options[:full_document] || FULL_DOCUMENT_DEFAULT ) }.tap do |doc| + {}.tap do |doc| + if @options[:full_document] + doc[:fullDocument] = @options[:full_document] + end + if resuming? # We have a resume token once we retrieved any documents. # However, if the first getMore fails and the user didn't pass # a resume token we won't have a resume token to use. # Use start_at_operation time in this case