Permalink
Browse files

lib/timeout.rb: In Ruby 1.9, Timeout::Error is a kind of RuntimeError

  • Loading branch information...
godfat committed Jul 25, 2012
1 parent d6a7a33 commit 2e09a914481d979cc365ae77da80ec2b19681e82
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/timeout.rb
View
@@ -35,7 +35,12 @@ module Timeout
##
# Raised by Timeout#timeout when the block times out.
- class Error<Interrupt
+ if RUBY_VERSION >= '1.9'
+ class Error<RuntimeError
+ end
+ else
+ class Error<Interrupt
+ end
end
# A mutex to protect @requests

0 comments on commit 2e09a91

Please sign in to comment.