From 04fb7c30e36432602c849409c020da8f5bcfe9aa Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sun, 21 May 2006 01:42:36 +0000 Subject: Remove Enumerable#first_match in favor of using break(result_for_each) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/enumerable.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index a49c4c701b..5c556ff98d 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -1,12 +1,4 @@ module Enumerable #:nodoc: - def first_match - match = nil - each do |items| - break if match = yield(items) - end - match - end - # Collect an enumerable into sets, grouped by the result of a block. Useful, # for example, for grouping records by date. # -- cgit v1.2.3