Enumerable#one? to prune iteration when count > 1; ref #1926

parent 2a771760
......@@ -465,6 +465,7 @@ module Enumerable
else
count += 1 if val.__svalue
end
return false if count > 1
end
count == 1 ? true : false
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment