1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-12 17:54:26 +02:00

Get rid of nasty infinite loop in while example

This commit is contained in:
David Underwood
2013-07-05 20:56:02 -04:00
parent 2fd1664c29
commit 33af584ad4

View File

@@ -194,6 +194,7 @@ end
counter = 1 counter = 1
while counter <= 5 do while counter <= 5 do
puts "iteration #{counter}" puts "iteration #{counter}"
counter += 1
end end
#=> iteration 1 #=> iteration 1
#=> iteration 2 #=> iteration 2