diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index 315982b..0be45e0 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -565,7 +565,7 @@ module Mongo def map_reduce(map, reduce, opts={}) map = BSON::Code.new(map) unless map.is_a?(BSON::Code) reduce = BSON::Code.new(reduce) unless reduce.is_a?(BSON::Code) - raw = opts[:raw] + raw = opts.delete(:raw) hash = BSON::OrderedHash.new hash['mapreduce'] = self.name