lib/mongo/grid/stream/read.rb in mongo-2.2.7 vs lib/mongo/grid/stream/read.rb in mongo-2.3.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (C) 2014-2015 MongoDB, Inc. +# Copyright (C) 2014-2016 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # @@ -131,12 +131,10 @@ # # @return [ Mongo::ServerSelector ] The read preference. # # @since 2.1.0 def read_preference - @read_preference ||= @options[:read] ? - ServerSelector.get(Options::Redacted.new((@options[:read] || {}).merge(fs.options))) : - fs.read_preference + @read_preference ||= ServerSelector.get(@options[:read] || fs.read_preference) end # Get the files collection file information document for the file being read. # # @example Get the file info document.