@@ -122,7 +122,7 @@ def add_stored_function(function_name, code)
122122 }
123123 )
124124 end
125-
125+
126126 # Removes stored Javascript function from the database. Returns
127127 # false if the function does not exist
128128 #
@@ -136,7 +136,7 @@ def remove_stored_function(function_name)
136136 return false
137137 end
138138 end
139-
139+
140140 # Adds a user to this database for use with authentication. If the user already
141141 # exists in the system, the password will be updated.
142142 #
@@ -390,7 +390,7 @@ def eval(code, *args)
390390 # @param [String] to new collection name.
391391 #
392392 # @return [True] returns +true+ on success.
393- #
393+ #
394394 # @raise MongoDBError if there's an error renaming the collection.
395395 def rename_collection ( from , to )
396396 oh = BSON ::OrderedHash . new
@@ -462,18 +462,15 @@ def ok?(doc)
462462 # key, specifying the command to be performed. In Ruby 1.9, OrderedHash isn't necessary since
463463 # hashes are ordered by default.
464464 #
465- # @param [Boolean] admin If +true+, the command will be executed on the admin
466- # collection. DEPRECATED.
467- #
468465 # @option opts [Boolean] :check_response (true) If +true+, raises an exception if the
469466 # command fails.
470467 # @option opts [Socket] :sock a socket to use for sending the command. This is mainly for internal use.
471468 #
472469 # @return [Hash]
473470 #
474471 # @core commands command_instance-method
475- def command ( selector , opts = { } , old_check_response = false , old_sock = nil )
476- check_response = opts [ :check_response ] . nil? ? true : opts [ :check_response ]
472+ def command ( selector , opts = { } )
473+ check_response = opts . fetch ( :check_response , true )
477474 sock = opts [ :sock ]
478475 raise MongoArgumentError , "command must be given a selector" unless selector . is_a? ( Hash ) && !selector . empty?
479476 if selector . keys . length > 1 && RUBY_VERSION < '1.9' && selector . class != BSON ::OrderedHash
0 commit comments