Refactor Enumerable#include?

This commit is contained in:
Jun Hiroe
2014-03-16 19:15:03 +09:00
parent a21088b2d7
commit bdeef827ac
+2 -4
View File
@@ -176,14 +176,12 @@ module Enumerable
#
# ISO 15.3.2.2.10
def include?(obj)
st = false
self.each{|val|
if val == obj
st = true
break
return true
end
}
st
false
end
##