I love Ruby

Posted by – 12/09/2004

require 'open-uri'
require 'timeout'

begin
    status = timeout(30) {
        file = open("http://www.debian.org/")
    }
rescue TimeoutError
    puts "Oops!"
end

And people still ask me why I love Ruby

Leave a Reply

Your email address will not be published. Required fields are marked *