Don't check keys on Collection#map_reduce
This commit is contained in:
parent
476d856abb
commit
969ec6f644
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue