diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 13:05:53 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-10 13:05:53 +0000 |
commit | 0f663b244944c5eb2b6c7d0862c15c377747df05 (patch) | |
tree | c03cca1e3b71be938e56cdf824b7d3a7fac040c1 /lib/timeout.rb | |
parent | 498b6f477631681b52460a9aa9dc2b4c837cd1e8 (diff) | |
download | ruby-0f663b244944c5eb2b6c7d0862c15c377747df05.tar.gz |
timeout.rb: removed and use Timeout::Error
* lib/timeout.rb (ExitException): removed internal exception class
and use Timeout::Error instead, as using throw/catch to isolate
each timeouts now. [ruby-dev:49179] [Bug #11344]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r-- | lib/timeout.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb index fec7b9428c..b57a11384f 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -24,8 +24,6 @@ module Timeout # Raised by Timeout#timeout when the block times out. class Error < RuntimeError - end - class ExitException < ::Exception # :nodoc: attr_reader :thread def self.catch(*args) @@ -101,7 +99,7 @@ module Timeout bt = e.backtrace end else - bt = ExitException.catch(message, &bl) + bt = Error.catch(message, &bl) end rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o bt.reject! {|m| rej =~ m} |