lib/mongo/collection/view/map_reduce.rb in mongo-2.4.0 vs lib/mongo/collection/view/map_reduce.rb in mongo-2.4.1

- old
+ new

@@ -105,11 +105,11 @@ # @since 2.0.0 def initialize(view, map, reduce, options = {}) @view = view @map = map.freeze @reduce = reduce.freeze - @options = options.freeze + @options = BSON::Document.new(options).freeze end # Set or get the jsMode flag for the operation. # # @example Set js mode for the operation. @@ -235,10 +235,10 @@ def send_fetch_query(server) fetch_query_op(server).execute(server) end def validate_collation!(server) - if (options[:collation] || options[Operation::COLLATION]) && !server.features.collation_enabled? + if (view.options[:collation] || options[:collation]) && !server.features.collation_enabled? raise Error::UnsupportedCollation.new end end end end