@@ -148,14 +148,6 @@ def find_one(spec_or_object_id=nil, options={})
148148 find ( spec , options . merge ( :limit => -1 ) ) . next_object
149149 end
150150
151- # DEPRECATED - use find_one instead
152- #
153- # Find the first record that matches +selector+. See #find.
154- def find_first ( selector = { } , options = { } )
155- warn "Collection#find_first is deprecated and will be removed. Please use Collection#find_one instead."
156- find_one ( selector , options )
157- end
158-
159151 # Save a document in this collection.
160152 #
161153 # If +to_save+ already has an '_id' then an update (upsert) operation
@@ -214,32 +206,6 @@ def clear
214206 remove ( { } )
215207 end
216208
217- # DEPRECATED - use update(... :upsert => true) instead
218- #
219- # Update records that match +selector+ by applying +obj+ as an update.
220- # If no match, inserts (???).
221- def repsert ( selector , obj )
222- warn "Collection#repsert is deprecated and will be removed. Please use Collection#update instead."
223- update ( selector , obj , :upsert => true )
224- end
225-
226- # DEPRECATED - use update(... :upsert => false) instead
227- #
228- # Update records that match +selector+ by applying +obj+ as an update.
229- def replace ( selector , obj )
230- warn "Collection#replace is deprecated and will be removed. Please use Collection#update instead."
231- update ( selector , obj )
232- end
233-
234- # DEPRECATED - use update(... :upsert => false) instead
235- #
236- # Update records that match +selector+ by applying +obj+ as an update.
237- # Both +selector+ and +modifier_obj+ are required.
238- def modify ( selector , modifier_obj )
239- warn "Collection#modify is deprecated and will be removed. Please use Collection#update instead."
240- update ( selector , modifier_obj )
241- end
242-
243209 # Update a single document in this collection.
244210 #
245211 # :spec :: a hash specifying elements which must be present for
@@ -420,14 +386,8 @@ def options
420386 end
421387
422388 # Get the number of documents in this collection.
423- #
424- # Specifying a +selector+ is DEPRECATED and will be removed. Please use
425- # find(selector).count() instead.
426- def count ( selector = nil )
427- if selector
428- warn "specifying a selector for Collection#count is deprecated and will be removed. Please use Collection.find(selector).count instead."
429- end
430- find ( selector || { } ) . count ( )
389+ def count ( )
390+ find ( ) . count ( )
431391 end
432392
433393 protected
0 commit comments