Skip to content

Commit

Permalink
RUBY-149 map-reduce fix for boolean ok
Browse files Browse the repository at this point in the history
  • Loading branch information
banker committed Jul 9, 2010
1 parent 20206be commit 24e8b69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongo/collection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ def map_reduce(map, reduce, opts={})
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"]]
Expand Down

0 comments on commit 24e8b69

Please sign in to comment.