Created
March 30, 2017 07:16
-
-
Save bparanj/7800ca88ae006015299e6f884568c1be to your computer and use it in GitHub Desktop.
Ruby Object Model Exercise #4
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
loop do | |
p 'This will print forever' | |
end |
Author
bparanj
commented
Mar 30, 2017
class Proc
def repeat
self.call while true
end
end
prc = Proc.new{ puts 'This will print forever' }
prc.repeat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment