Created
May 31, 2010 14:59
-
-
Save dasch/419903 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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