next in ruby make infinite loop code example
Example 1: infinite loop ruby
loop do
puts Time.now
sleep(5) # 5 second sleep
end
Example 2: infinite loop in ruby
loop do
puts "infinite"
end
loop do
puts Time.now
sleep(5) # 5 second sleep
end
loop do
puts "infinite"
end