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

- old
+ new

@@ -209,10 +209,11 @@ def send_initial_query(server) unless valid_server?(server) log_warn(REROUTE) server = cluster.next_primary(false) end + validate_collation!(server) result = initial_query_op.execute(server) inline? ? result : send_fetch_query(server) end def fetch_query_spec @@ -231,9 +232,13 @@ end end def send_fetch_query(server) fetch_query_op(server).execute(server) + end + + def validate_collation!(server) + raise Error::UnsupportedCollation.new if options[:collation] && !server.features.collation_enabled? end end end end end