From ba0f38f89e8473490270957849d7d5b06f6ee65b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 13 Jun 2008 17:34:17 -0500 Subject: Change Enumberal#several? to Enumberal#many? --- activesupport/CHANGELOG | 2 +- activesupport/lib/active_support/core_ext/enumerable.rb | 2 +- activesupport/test/core_ext/enumerable_test.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index 0272b08215..1267f05c75 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -4,7 +4,7 @@ * Added Object#present? which is equivalent to !Object#blank? [DHH] -* Added Enumberable#several? to encapsulate collection.size > 1 [DHH] +* Added Enumberable#many? to encapsulate collection.size > 1 [DHH] * Add more standard Hash methods to ActiveSupport::OrderedHash [Steve Purcell] diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb index 8e148cc1b4..9647797ec2 100644 --- a/activesupport/lib/active_support/core_ext/enumerable.rb +++ b/activesupport/lib/active_support/core_ext/enumerable.rb @@ -79,7 +79,7 @@ module Enumerable end # Returns true if the collection has more than 1 element. Functionally equivalent to collection.size > 1. - def several? + def many? size > 1 end end diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb index c37e0d269e..fb9b9b8916 100644 --- a/activesupport/test/core_ext/enumerable_test.rb +++ b/activesupport/test/core_ext/enumerable_test.rb @@ -65,8 +65,8 @@ class EnumerableTests < Test::Unit::TestCase end def test_several - assert ![].several? - assert ![ 1 ].several? - assert [ 1, 2 ].several? + assert ![].many? + assert ![ 1 ].many? + assert [ 1, 2 ].many? end end -- cgit v1.2.3