J
Jeff Bowen
I was hoping that the following code would print out hi with one second
gaps. However it waits 5 seconds and then prints out hi 5 times.
def test_puts
puts 'hi'
end
def test_sleep
sleep 1
test_puts
end
5.downto(1) do
test_sleep
end
gaps. However it waits 5 seconds and then prints out hi 5 times.
def test_puts
puts 'hi'
end
def test_sleep
sleep 1
test_puts
end
5.downto(1) do
test_sleep
end