Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created July 22, 2019 01:17
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 havenwood/d2b4bc35ce4b91940c1bdf2422dd133b to your computer and use it in GitHub Desktop.
Save havenwood/d2b4bc35ce4b91940c1bdf2422dd133b to your computer and use it in GitHub Desktop.
# break twice
loop do
value = 0.step.each do
break 42
end
break value
end
# throw and catch
catch :broken do
loop do
0.step.each do
throw :broken, 42
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment