LOOP
This works with do:
x=0
loop do puts x; x+=1; break if x == 100 end
but not with a semicolon:
x=0
loop; puts x; x+=1; break if x == 100 end
UNTIL
However, this works with 'do':
until x == 100 do puts x; x+=1 end
and with a simicolon:
until x == 100; puts x; x+=1 end
With certain Ruby syntax I have a choice of using a semicolon or the 'do' keyword to delimit the end of a statement - as with the 'until' example above. But I noticed this is not possible with the Kernel.loop method at least in Ruby 1.9. Is this a recent change in the language or is the loop method just different? Is there a reason why it's like this?