1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

timeout.rb: use UncaughtThrowError

* lib/timeout.rb (Timeout::ExitException#exception): rescue
  UncaughtThrowError which is specific for throw, instead of
  ArgumentError.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-11-16 10:11:08 +00:00
parent 5b85fbd95b
commit f45e0d537f
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,9 @@
Sun Nov 16 19:11:04 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/timeout.rb (Timeout::ExitException#exception): rescue
UncaughtThrowError which is specific for throw, instead of
ArgumentError.
Sun Nov 16 18:22:18 2014 Eric Wong <e@80x24.org>
* tool/update-deps: warning to disable ccache

View file

@ -40,8 +40,7 @@ module Timeout
bt = caller
begin
throw(self, bt)
rescue ArgumentError => e
raise unless e.message.start_with?("uncaught throw")
rescue UncaughtThrowError
raise Error, message, backtrace
end
end