Project

General

Profile

« Previous | Next » 

Revision c00e2889

Added by naruse (Yui NARUSE) about 10 years ago

merge revision(s) 44517,44518,44519,44523: [Backport #9354]

    * lib/timeout.rb (Timeout#timeout): when a custom exception is given,
      no instance is needed to be caught, so defer creating new instance
      until it is raised.  [ruby-core:59511] [Bug #9354]

    * lib/timeout.rb (Timeout#timeout): should not rescue ordinarily
      raised ExitException, which should not be thrown.

    * lib/timeout.rb (Timeout::ExitException.catch): set @thread only if
      it ought to be caught.

    * lib/timeout.rb (Timeout::ExitException.catch): pass arguments
      for new instance.

    * lib/timeout.rb (Timeout::ExitException#exception): fallback to
      Timeout::Error if couldn't throw.  [ruby-dev:47872] [Bug #9380]

    * lib/timeout.rb (Timeout#timeout): initialize ExitException with
      message for the fallback case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e