Commit 31206f7a
31206f7ac549Merged
Ryan Seys <[email protected]> · 6 months ago · 6 files · +6 added
Description
test: cover redo in zip, step, and cycle blocks
Three tests pinning the Array#zip, Integer#step, and Array#cycle
method-iterator wrappings. redo_cycle uses the count-bounded form
([1,2].cycle(2) do ...) so the test terminates without break.
🤖 Generated with Claude Code
Details
- Commit
- 31206f7ac549
- Parent
- c3af7ad7d5f9
test/redo_cycle.rbaddedView file
1+
# RedoNode -- `redo` inside Array#cycle (with a count to terminate).2+
attempts = 03+
[1, 2].cycle(2) do |x|4+
attempts += 15+
if x == 1 && attempts < 36+
redo7+
end8+
puts "x=#{x} attempt=#{attempts}"9+
end10+
puts "total=#{attempts}"test/redo_cycle.rb.expectedaddedView file
Loading diff…
test/redo_step.rbaddedView file
Loading diff…
test/redo_step.rb.expectedaddedView file
Loading diff…
test/redo_zip.rbaddedView file
Loading diff…
test/redo_zip.rb.expectedaddedView file
Loading diff…