Skip to content

Instantly share code, notes, and snippets.

@jrgifford
Created March 28, 2011 00:39
Show Gist options
  • Save jrgifford/889814 to your computer and use it in GitHub Desktop.
Save jrgifford/889814 to your computer and use it in GitHub Desktop.
This is a Ruby Koan.
def test_while_statement
i = 1
result = 1
while i <= 10
result = result * i
i += 1
end
assert_equal result, result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment