diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-05-21 01:42:36 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-05-21 01:42:36 +0000 |
commit | 04fb7c30e36432602c849409c020da8f5bcfe9aa (patch) | |
tree | d3e9daf3547c9f4278d14377ae048b6233dbd3df /activesupport/CHANGELOG | |
parent | c50113bc6110624bd411466e7c36bdde23226959 (diff) | |
download | rails-04fb7c30e36432602c849409c020da8f5bcfe9aa.tar.gz rails-04fb7c30e36432602c849409c020da8f5bcfe9aa.tar.bz2 rails-04fb7c30e36432602c849409c020da8f5bcfe9aa.zip |
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
Diffstat (limited to 'activesupport/CHANGELOG')
-rw-r--r-- | activesupport/CHANGELOG | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 670584b8eb..59fc6c27ed 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,5 +1,18 @@ *SVN* +* Remove Enumerable#first_match since break(value) handles the use case well enough. [Nicholas Seckar] + Enumerable#first_match was like detect, but instead of returning the matching element, the yielded value returned. For example: + + user_xml = adapters(:from => User, :to => Xml).first_match do |adapter| + adapter.adapt @user + end + + But this is just as easily done with: + + user_xml = adapters(:from => User, :to => Xml).each do + break adapter.adapt(@user) + end + * Make Array#in_groups_of just return the grouped collection if a block isn't given. [Marcel Molina Jr.] * Don't destroy a HashWithIndifferentAccess if symbolize_keys! or stringify_keys! is called on it. Closes #5076. [Marcel Molina Jr., guy.naor@famundo.com] |