Skip to content

Instantly share code, notes, and snippets.

@dasch
Created May 31, 2010 14:59
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 dasch/419903 to your computer and use it in GitHub Desktop.
Save dasch/419903 to your computer and use it in GitHub Desktop.
# Global GOTO table.
$LABELS = Hash.new
def label(name)
$LABELS[name] = callcc {|cc| cc }
end
def goto(name)
$LABELS[name].call
end
# Infinite loop!
label :loop
puts "HELLO!"
goto :loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment