RUBY-149 map-reduce fix for boolean ok
This commit is contained in:
parent
20206bee2b
commit
24e8b690ed
|
@ -487,7 +487,7 @@ module Mongo
|
||||||
hash.merge! opts
|
hash.merge! opts
|
||||||
|
|
||||||
result = @db.command(hash)
|
result = @db.command(hash)
|
||||||
unless result["ok"] == 1
|
unless Mongo::Support.ok?(result)
|
||||||
raise Mongo::OperationFailure, "map-reduce failed: #{result['errmsg']}"
|
raise Mongo::OperationFailure, "map-reduce failed: #{result['errmsg']}"
|
||||||
end
|
end
|
||||||
@db[result["result"]]
|
@db[result["result"]]
|
||||||
|
|
Loading…
Reference in New Issue