Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (14 sloc) 0.222 kb
require 'timeout'
begin
1_000_000.times {
begin
Timeout.timeout(0.001) {sleep 0.001}
rescue Timeout::Error
puts 'timeout'
else
puts 'ok'
end
}
rescue Timeout::Error
puts "should never be here"
end
Jump to Line
Something went wrong with that request. Please try again.