Skip to content

Instantly share code, notes, and snippets.

@dlitz
Created April 26, 2010 00:46
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 dlitz/378860 to your computer and use it in GitHub Desktop.
Save dlitz/378860 to your computer and use it in GitHub Desktop.
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