Created
April 26, 2010 00:46
-
-
Save dlitz/378860 to your computer and use it in GitHub Desktop.
This file contains 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
class X | |
def initialize | |
@i = 0 | |
end | |
def run_forever | |
loop do # infinite loop | |
puts "hello world #{i}" | |
@i += 1 | |
end | |
end | |
end | |
class X | |
def initialize | |
@i = 0 | |
end | |
def run_forever | |
loop do # infinite loop | |
run_once | |
end | |
end | |
def run_once | |
puts "hello world #{i}" | |
@i += 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment