rspec/rules/S2251/description.adoc

2 lines
278 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
A ``++for++`` loop with a counter that moves in the wrong direction is not an infinite loop. Because of wraparound, the loop will eventually reach its stop condition, but in doing so, it will run many, many more times than anticipated, potentially causing unexpected behavior.