Skip to content

Instantly share code, notes, and snippets.

@AlexanderPavlenko
Last active December 16, 2015 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexanderPavlenko/5443488 to your computer and use it in GitHub Desktop.
Save AlexanderPavlenko/5443488 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment