Skip to content
Browse files

Dont be an ass and leave merge shit in stable, please

  • Loading branch information...
1 parent fda3ac6 commit f039bbb13e5f28aa7cf4ee479895163c24e8c353 @dhh dhh committed Dec 14, 2009
View
15 activesupport/lib/active_support/core_ext/enumerable.rb
@@ -102,15 +102,6 @@ def many?(&block)
size = block_given? ? select(&block).size : self.size
size > 1
end
-<<<<<<< HEAD
-=======
-
- # The negative of the Enumerable#include?. Returns true if the collection does not include the object.
- def exclude?(object)
- !include?(object)
- end
-end
->>>>>>> 7b61541... Add Enumerable#exclude? to bring parity to Enumerable#include? and avoid if !x.include?/else calls [DHH]
# Returns true if none of the elements match the given block.
#
@@ -120,4 +111,10 @@ def exclude?(object)
def none?(&block)
!any?(&block)
end unless [].respond_to?(:none?)
+
+
+ # The negative of the Enumerable#include?. Returns true if the collection does not include the object.
+ def exclude?(object)
+ !include?(object)
+ end
end
View
4 activesupport/test/core_ext/enumerable_test.rb
@@ -83,7 +83,6 @@ def test_many
assert ![ 1, 2 ].many? {|x| x > 1 }
assert [ 1, 2, 2 ].many? {|x| x > 1 }
end
-<<<<<<< HEAD
def test_none
assert [].none?
@@ -94,11 +93,10 @@ def test_none
assert ![ 2 ].none? {|x| x > 1 }
assert ![ 1, 2 ].none? {|x| x > 1 }
assert [ 1, 1 ].none? {|x| x > 1 }
-=======
+ end
def test_exclude?
assert [ 1 ].exclude?(2)
assert ![ 1 ].exclude?(1)
->>>>>>> 7b61541... Add Enumerable#exclude? to bring parity to Enumerable#include? and avoid if !x.include?/else calls [DHH]
end
end

1 comment on commit f039bbb

@nateware

LOL!

Please sign in to comment.
Something went wrong with that request. Please try again.