From af0822f4762900b0676f20cc6880293c553f269b Mon Sep 17 00:00:00 2001 From: Evgeny Shadchnev Date: Wed, 27 Oct 2010 10:01:44 +0100 Subject: [PATCH] initializing query_run and closed before they are first used --- lib/mongo/cursor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index 96766a8..0031694 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -50,12 +50,12 @@ module Mongo @explain = options[:explain] @socket = options[:socket] @tailable = options[:tailable] || false + @closed = false + @query_run = false batch_size(options[:batch_size] || 0) @full_collection_name = "#{@collection.db.name}.#{@collection.name}" @cache = [] - @closed = false - @query_run = false @returned = 0 end