Skip to content

Instantly share code, notes, and snippets.

@tkadauke
Created August 18, 2016 05:25
Show Gist options
  • Save tkadauke/464ef5b6c4585bc88d3d0110d3412907 to your computer and use it in GitHub Desktop.
Save tkadauke/464ef5b6c4585bc88d3d0110d3412907 to your computer and use it in GitHub Desktop.
Endless loop in Ruby without "while"
def loop
yield
raise
rescue
retry
end
loop do
puts "yippie"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment