直到

當滿足給定條件時,while 迴圈執行塊:

i = 0
while i < 5
  puts "Iteration ##{i}"
  i +=1
end

當條件為假時,until 迴圈執行塊:

i = 0
until i == 5
  puts "Iteration ##{i}"
  i +=1
end