remove old DB#command arguments
This commit is contained in:
parent
f1f0c87b3b
commit
9e223f4510
|
@ -462,9 +462,6 @@ module Mongo
|
|||
# key, specifying the command to be performed. In Ruby 1.9, OrderedHash isn't necessary since
|
||||
# hashes are ordered by default.
|
||||
#
|
||||
# @param [Boolean] admin If +true+, the command will be executed on the admin
|
||||
# collection. DEPRECATED.
|
||||
#
|
||||
# @option opts [Boolean] :check_response (true) If +true+, raises an exception if the
|
||||
# command fails.
|
||||
# @option opts [Socket] :sock a socket to use for sending the command. This is mainly for internal use.
|
||||
|
@ -472,8 +469,8 @@ module Mongo
|
|||
# @return [Hash]
|
||||
#
|
||||
# @core commands command_instance-method
|
||||
def command(selector, opts={}, old_check_response=false, old_sock=nil)
|
||||
check_response = opts[:check_response].nil? ? true : opts[:check_response]
|
||||
def command(selector, opts={})
|
||||
check_response = opts.fetch(:check_response, true)
|
||||
sock = opts[:sock]
|
||||
raise MongoArgumentError, "command must be given a selector" unless selector.is_a?(Hash) && !selector.empty?
|
||||
if selector.keys.length > 1 && RUBY_VERSION < '1.9' && selector.class != BSON::OrderedHash
|
||||
|
|
Loading…
Reference in New Issue