Ruby

Ruby

Made by DeepSource

while/until detected in begin block RB-LI1033

Bug risk
Major

while/until should be used at the beginning of the block, and without the begin statement.

Bad practice

begin
  puts i
  i += 1
end while i < 10

Recommended

while i < 10
  puts i
  i += 1
end