Created
September 10, 2018 13:09
-
-
Save mehdi-farsi/b0d94e96f13fb7d9ed56f6082e0d6c6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[1,2,3].each do |n| | |
puts "Step #{n}" | |
n += 1 and redo if n < 2 | |
end | |
# produces: | |
# | |
# Step 1 | |
# Step 2 | |
# Step 2 | |
# Step 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment