RUBY-149 map-reduce fix for boolean ok

This commit is contained in:
Kyle Banker 2010-07-09 12:53:22 -04:00
parent 20206bee2b
commit 24e8b690ed
1 changed files with 1 additions and 1 deletions

View File

@ -487,7 +487,7 @@ module Mongo
hash.merge! opts
result = @db.command(hash)
unless result["ok"] == 1
unless Mongo::Support.ok?(result)
raise Mongo::OperationFailure, "map-reduce failed: #{result['errmsg']}"
end
@db[result["result"]]