aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/enumerable.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add Enumerable#exclude? to bring parity to Enumerable#include? and avoid if ↵David Heinemeier Hansson2009-12-141-0/+5
| | | | !x.include?/else calls [DHH]
* Enumerable#none? is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-9/+0
|
* Remove unnecessary &block from Range#sum and add tests for (num..float).sumPratik Naik2009-08-091-1/+1
|
* Optimize Range#sum only for integers [#2489]José Valim2009-08-091-2/+3
|
* Optimize Range#sum to use arithmetic progression when a block is not given ↵José Valim2009-08-091-0/+9
| | | | | | [#2489]. Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Enumerable#sum now works will all enumerables, even if they don't respond to ↵Marc-Andre Lafortune2009-08-081-4/+2
| | | | | | | | :size [#2489 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge docrailsPratik Naik2009-07-251-1/+1
|
* Simplify Enumerable#each_with_objectJeremy Kemper2009-03-211-4/+3
|
* Enumerable#none? conforms to Ruby 1.8.7 behaviorJeremy Kemper2008-11-191-3/+3
|
* Update doc to make more senseDavid Heinemeier Hansson2008-11-191-1/+1
|
* Added Enumerable#none? to check that none of the elements match the block ↵Damian Janowski2008-11-191-0/+9
| | | | | | [#1408 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Don't shadow arg with block varJeremy Kemper2008-09-081-2/+2
|
* Add each_with_object from 1.9 for a more convenient alternative to inject.Adam Keys2008-09-031-1/+21
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#962 state:committed]
* Added block-handling to Enumerable#many? (Damian Janowski) [#452 state:resolved]David Heinemeier Hansson2008-06-201-1/+3
|
* Change Enumberal#several? to Enumberal#many?David Heinemeier Hansson2008-06-131-1/+1
|
* Merge branch 'master' of git@github.com:rails/railsDavid Heinemeier Hansson2008-06-121-3/+14
|\
| * Rubinious: work around h[k] ||= v returning []= result instead of vJeremy Kemper2008-06-101-3/+14
| |
* | Added Enumberable#several? to encapsulate collection.size > 1 [DHH]David Heinemeier Hansson2008-06-121-0/+5
|/
* Improve documentation coverage and markupXavier Noria2008-05-021-10/+11
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.8.7 compat: override unordered Enumerable#group_byJeremy Kemper2008-04-201-1/+4
|
* Improve documentation.Pratik Naik2008-03-261-5/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enumerable#group_by uses ActiveSupport::OrderedHashJeremy Kemper2008-01-231-15/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix up Enumerable#group_byJeremy Kemper2008-01-091-7/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the implementation of Enumerable#group_by to use a double array ↵David Heinemeier Hansson2007-12-311-2/+7
| | | | | | approach instead of a hash such that the insert order is honored [DHH/Marcel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8516 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some 1.9 forward compatibilityJeremy Kemper2007-09-141-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Expose methods added to Enumerable in the documentation, such as group_by. ↵Marcel Molina2006-10-221-2/+2
| | | | | | Closes #6170. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optional identity for Enumerable#sum defaults to zero. Closes #5657.Jeremy Kemper2006-07-091-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4599 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enumerable#sum without blocks. Closes #5505. Don't assume 0 identity for sum.Jeremy Kemper2006-06-251-5/+12
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Enumerable#index_byNicholas Seckar2006-06-241-0/+15
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4491 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cant use separate module [DHH]David Heinemeier Hansson2006-06-241-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4490 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Enumerable#sum for calculating a sum from the elements [DHH]David Heinemeier Hansson2006-06-241-1/+13
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove Enumerable#first_match in favor of using break(result_for_each)Nicholas Seckar2006-05-211-8/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make Enumerable#group_by return a Hash (sacrificing the preservation of ↵Marcel Molina2006-03-011-8/+3
| | | | | | ordering) so that it is more compatible with the version that is in Ruby 1.9 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3727 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Enumerable#group_by and Array#in_groups_ofMarcel Molina2006-03-011-1/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont include unnecessary active support classes in docsDavid Heinemeier Hansson2005-10-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Enumerable#first_matchNicholas Seckar2005-10-141-0/+9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de