summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Underwood <davefp@gmail.com>2013-07-05 20:56:02 -0400
committerDavid Underwood <davefp@gmail.com>2013-07-05 20:56:02 -0400
commit33af584ad4e72084d124ed05a9c65f155e56bded (patch)
treee8e68ac92d50a03dbc281dd28eafa96b4553235b
parent2fd1664c296cf45a5a5640def9c8dc927e885138 (diff)
Get rid of nasty infinite loop in while example
-rw-r--r--ruby.html.markdown1
1 files changed, 1 insertions, 0 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 2c9a4cb9..9f3d0615 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -194,6 +194,7 @@ end
counter = 1
while counter <= 5 do
puts "iteration #{counter}"
+ counter += 1
end
#=> iteration 1
#=> iteration 2