RUBY-289 ensure that negative limit is logged

This commit is contained in:
Kyle Banker 2011-08-08 18:31:30 -04:00
parent f333871bc0
commit 82b103752e
1 changed files with 2 additions and 2 deletions

View File

@ -489,8 +489,8 @@ module Mongo
def instrument_payload def instrument_payload
log = { :database => @db.name, :collection => @collection.name, :selector => selector } log = { :database => @db.name, :collection => @collection.name, :selector => selector }
log[:fields] = @fields if @fields log[:fields] = @fields if @fields
log[:skip] = @skip if @skip && (@skip > 0) log[:skip] = @skip if @skip && (@skip != 0)
log[:limit] = @limit if @limit && (@limit > 0) log[:limit] = @limit if @limit && (@limit != 0)
log[:order] = @order if @order log[:order] = @order if @order
log log
end end