Last active
August 29, 2015 14:22
-
-
Save ajbeach2/32ac6a5bb65df27ac318 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
def tt(t) | |
10.times do | |
puts t.call | |
end | |
end | |
def time | |
Time.now | |
end | |
t = Proc.new { time } | |
tt(t) | |
#Why does this print the same time, 10 times in a row? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment