Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Created September 10, 2018 13:10
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/3457a84a15a11eacfd0f47299c246bbd to your computer and use it in GitHub Desktop.
Save mehdi-farsi/3457a84a15a11eacfd0f47299c246bbd to your computer and use it in GitHub Desktop.
def hello
yield
end
hello do
puts 'hello'
redo
end
# produces:
#
# hello
# hello
# hello
# ... infinite loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment