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

- old
+ new

@@ -71,11 +71,11 @@ # # @since 2.0.0 def initialize(view, pipeline, options = {}) @view = view @pipeline = pipeline.dup - @options = options.dup + @options = BSON::Document.new(options).freeze end # Get the explain plan for the aggregation. # # @example Get the explain plan for the aggregation. @@ -118,10 +118,10 @@ validate_collation!(server) initial_query_op.execute(server) end def validate_collation!(server) - if (@options[:collation] || @options[Operation::COLLATION]) && !server.features.collation_enabled? + if options[:collation] && !server.features.collation_enabled? raise Error::UnsupportedCollation.new end end end end