From 24e8b690ed7ff753bf3e54ef164cde2c68708657 Mon Sep 17 00:00:00 2001 From: Kyle Banker Date: Fri, 9 Jul 2010 12:53:22 -0400 Subject: [PATCH] RUBY-149 map-reduce fix for boolean ok --- lib/mongo/collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index ea5f71f..a6a7854 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -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"]]