AlexanderPavlenko
4/23/2013 - 1:21 PM

gistfile1.txt

require 'timeout'

Timeout.timeout(0.5) do
  begin
    sleep 1
  rescue Exception => ex
    puts ex.inspect
    puts 'ಠ_ಠ'
  end
end

Timeout.timeout(0.5) do
  begin
    sleep 1
  rescue => ex
    puts ex.inspect
  end
end