Unverified Commit 7685783a authored by ksss's avatar ksss

Add regression test for Enumerable#cycle

parent 126d5548
......@@ -128,6 +128,13 @@ assert("Enumerable#cycle") do
["a", "b", "c"].cycle(2) { |v| a << v }
assert_equal ["a", "b", "c", "a", "b", "c"], a
assert_raise(TypeError) { ["a", "b", "c"].cycle("a") { |v| a << v } }
empty = Class.new do
include Enumerable
def each
end
end
assert_nil empty.new.cycle { break :nope }
end
assert("Enumerable#find_index") do
......
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