Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Created September 10, 2018 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehdi-farsi/b0d94e96f13fb7d9ed56f6082e0d6c6f to your computer and use it in GitHub Desktop.
Save mehdi-farsi/b0d94e96f13fb7d9ed56f6082e0d6c6f to your computer and use it in GitHub Desktop.
[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