Ruby provides several looping constructs:
for i in 1..5 puts i end
i = 0 while i < 5 puts i i += 1 end
i = 0 until i == 5 puts i i += 1 end