Skip to content

Instantly share code, notes, and snippets.

@jakeonrails
Created February 27, 2013 20:08
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 jakeonrails/5051233 to your computer and use it in GitHub Desktop.
Save jakeonrails/5051233 to your computer and use it in GitHub Desktop.
PING PONG ENUMERATOR!
pinger = Enumerator.new do |yielder|
loop
yielder << "PING"
end
end
pinger.each do |ping|
puts ping
puts "PONG"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment