One-line looping in Ruby.

Filed under stuff-I-should-have-known. You can have one liner looping constructs in Ruby

x = 0
x += 1 while x < 5

or

x = 0
x += 1 until x == 5