Skip to content

Instantly share code, notes, and snippets.

@mehdi-farsi
Created September 10, 2018 13:10
Show Gist options
  • 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