diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index d98c145..2e1de47 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -480,7 +480,6 @@ module Mongo # # @core mapreduce map_reduce-instance_method def map_reduce(map, reduce, opts={}) - opts.assert_valid_keys(:query, :sort, :limit, :finalize, :out, :keeptemp, :verbose, :raw) map = BSON::Code.new(map) unless map.is_a?(BSON::Code) reduce = BSON::Code.new(reduce) unless reduce.is_a?(BSON::Code) raw = opts.delete(:raw) diff --git a/test/collection_test.rb b/test/collection_test.rb index 269eafa..beae5b9 100644 --- a/test/collection_test.rb +++ b/test/collection_test.rb @@ -453,14 +453,6 @@ class TestCollection < Test::Unit::TestCase assert res["counts"] assert res["timeMillis"] end - - def test_allows_only_valid_keys - m = Code.new("function() { emit(this.user_id, 1); }") - r = Code.new("function(k,vals) { return 1; }") - assert_raise ArgumentError do - @@test.map_reduce(m, r, :foo => true) - end - end end if @@version > "1.3.0"