aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb9
-rw-r--r--activesupport/test/core_ext/enumerable_test.rb11
2 files changed, 0 insertions, 20 deletions
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb
index 15a303cf04..b11c916f61 100644
--- a/activesupport/lib/active_support/core_ext/enumerable.rb
+++ b/activesupport/lib/active_support/core_ext/enumerable.rb
@@ -101,15 +101,6 @@ module Enumerable
size = block_given? ? select(&block).size : self.size
size > 1
end
-
- # Returns true if none of the elements match the given block.
- #
- # success = responses.none? {|r| r.status / 100 == 5 }
- #
- # This is a builtin method in Ruby 1.8.7 and later.
- def none?(&block)
- !any?(&block)
- end unless [].respond_to?(:none?)
end
class Range #:nodoc:
diff --git a/activesupport/test/core_ext/enumerable_test.rb b/activesupport/test/core_ext/enumerable_test.rb
index a8e98891d3..66f5f9fbde 100644
--- a/activesupport/test/core_ext/enumerable_test.rb
+++ b/activesupport/test/core_ext/enumerable_test.rb
@@ -89,15 +89,4 @@ class EnumerableTests < Test::Unit::TestCase
assert ![ 1, 2 ].many? {|x| x > 1 }
assert [ 1, 2, 2 ].many? {|x| x > 1 }
end
-
- def test_none
- assert [].none?
- assert [nil, false].none?
- assert ![1].none?
-
- assert [].none? {|x| x > 1 }
- assert ![ 2 ].none? {|x| x > 1 }
- assert ![ 1, 2 ].none? {|x| x > 1 }
- assert [ 1, 1 ].none? {|x| x > 1 }
- end
end