aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/enumerable_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-1/+1
| | | | 's/[ \t]*$//' -i {} \;)
* 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-11/+0
|
* Symbol#to_proc is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-1/+0
|
* Improving test coverage for Range#sum [#2489]José Valim2009-08-091-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove unnecessary &block from Range#sum and add tests for (num..float).sumPratik Naik2009-08-091-0/+1
|
* Make enumerable test run stand alonePratik Naik2009-08-091-0/+1
|
* Optimize Range#sum only for integers [#2489]José Valim2009-08-091-0/+1
|
* Optimize Range#sum to use arithmetic progression when a block is not given ↵José Valim2009-08-091-0/+2
| | | | | | [#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-0/+4
| | | | | | | | :size [#2489 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Explicit test dependenciesJeremy Kemper2009-03-281-0/+2
|
* Enumerable#none? conforms to Ruby 1.8.7 behaviorJeremy Kemper2008-11-191-1/+2
|
* Added Enumerable#none? to check that none of the elements match the block ↵Damian Janowski2008-11-191-0/+10
| | | | | | [#1408 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Add each_with_object from 1.9 for a more convenient alternative to inject.Adam Keys2008-09-031-0/+5
| | | | | 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-2/+7
|
* Change Enumberal#several? to Enumberal#many?David Heinemeier Hansson2008-06-131-3/+3
|
* Added Enumberable#several? to encapsulate collection.size > 1 [DHH]David Heinemeier Hansson2008-06-121-0/+6
|
* Add OrderedHash#to_hash. Closes #11266 [josh]Michael Koziarski2008-03-031-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8974 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enumerable#group_by uses ActiveSupport::OrderedHashJeremy Kemper2008-01-231-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8700 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix up Enumerable#group_byJeremy Kemper2008-01-091-2/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8604 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat. References #1689 [Pratik Naik]Jeremy Kemper2007-12-101-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8363 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change test for ruby 1.9 crashJeremy Kemper2007-09-271-6/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Some 1.9 forward compatibilityJeremy Kemper2007-09-141-4/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optional identity for Enumerable#sum defaults to zero. Closes #5657.Jeremy Kemper2006-07-091-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4599 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* r4487@asus: jeremy | 2006-04-29 12:21:39 -0700Jeremy Kemper2006-07-081-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check whether @flash is defined? for warnings-safety. r4488@asus: jeremy | 2006-04-29 12:23:15 -0700 Check whether @flash is defined? for warnings-safety. Obviates nil? check. r4489@asus: jeremy | 2006-04-29 12:45:18 -0700 Check whether @session is defined? for warnings-safety. r4490@asus: jeremy | 2006-04-29 12:50:41 -0700 Check whether @rendering_runtime is defined? for warnings-safety. r4491@asus: jeremy | 2006-04-29 12:55:01 -0700 Check whether @_cycles is defined? for warnings-safety. r4492@asus: jeremy | 2006-04-29 12:59:19 -0700 Check whether instance variables are defined? for warnings-safety. r4493@asus: jeremy | 2006-04-29 13:14:09 -0700 Add nil @template to PrototypeHelperTest to suppress unitialized instance variable warning. r4494@asus: jeremy | 2006-04-29 13:31:34 -0700 Check whether @auto_index defined? for warnings-safety. r4495@asus: jeremy | 2006-04-29 13:32:24 -0700 Wrap content_columns redefinitions with silence_warnings. r4496@asus: jeremy | 2006-04-29 13:35:28 -0700 Wrap more redefinitions with silence_warnings. r4829@asus: jeremy | 2006-07-08 10:59:20 -0700 abstract unit, fix warnings r4830@asus: jeremy | 2006-07-08 11:06:12 -0700 Use parens to silence warning. r4831@asus: jeremy | 2006-07-08 11:06:48 -0700 Use parens to silence warning. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Enumerable#sum without blocks. Closes #5505. Don't assume 0 identity for sum.Jeremy Kemper2006-06-251-3/+23
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Enumerable#index_byNicholas Seckar2006-06-241-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4491 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Enumerable#sum for calculating a sum from the elements [DHH]David Heinemeier Hansson2006-06-241-1/+8
| | | | 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-10/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Enumerable#group_by and Array#in_groups_ofMarcel Molina2006-03-011-1/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Enumerable#first_matchNicholas Seckar2005-10-141-0/+15
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de