Skip to content

Instantly share code, notes, and snippets.

@ajbeach2
Last active August 29, 2015 14:22
Show Gist options
  • Save ajbeach2/32ac6a5bb65df27ac318 to your computer and use it in GitHub Desktop.
Save ajbeach2/32ac6a5bb65df27ac318 to your computer and use it in GitHub Desktop.
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