зеркало из https://github.com/github/ruby.git
Update vendored timeout to 0.4.2
This commit is contained in:
Родитель
d9c754ab44
Коммит
99c35edae1
|
@ -4,7 +4,7 @@
|
|||
# == Synopsis
|
||||
#
|
||||
# require 'rubygems/vendor/timeout/lib/timeout'
|
||||
# status = Gem::Timeout::timeout(5) {
|
||||
# status = Gem::Timeout.timeout(5) {
|
||||
# # Something that should be interrupted if it takes more than 5 seconds...
|
||||
# }
|
||||
#
|
||||
|
@ -13,28 +13,25 @@
|
|||
# Gem::Timeout provides a way to auto-terminate a potentially long-running
|
||||
# operation if it hasn't finished in a fixed amount of time.
|
||||
#
|
||||
# Previous versions didn't use a module for namespacing, however
|
||||
# #timeout is provided for backwards compatibility. You
|
||||
# should prefer Gem::Timeout.timeout instead.
|
||||
#
|
||||
# == Copyright
|
||||
#
|
||||
# Copyright:: (C) 2000 Network Applied Communication Laboratory, Inc.
|
||||
# Copyright:: (C) 2000 Information-technology Promotion Agency, Japan
|
||||
|
||||
module Gem::Timeout
|
||||
VERSION = "0.4.1"
|
||||
# The version
|
||||
VERSION = "0.4.2"
|
||||
|
||||
# Internal error raised to when a timeout is triggered.
|
||||
class ExitException < Exception
|
||||
def exception(*)
|
||||
def exception(*) # :nodoc:
|
||||
self
|
||||
end
|
||||
end
|
||||
|
||||
# Raised by Gem::Timeout.timeout when the block times out.
|
||||
class Error < RuntimeError
|
||||
def self.handle_timeout(message)
|
||||
def self.handle_timeout(message) # :nodoc:
|
||||
exc = ExitException.new(message)
|
||||
|
||||
begin
|
||||
|
|
|
@ -11,7 +11,7 @@ gem "optparse", "0.6.0"
|
|||
gem "pub_grub", github: "jhawthorn/pub_grub"
|
||||
gem "resolv", "0.5.0"
|
||||
gem "securerandom", "0.3.2"
|
||||
gem "timeout", "0.4.1"
|
||||
gem "timeout", "0.4.2"
|
||||
gem "thor", "1.3.0"
|
||||
gem "tsort", "0.2.0"
|
||||
gem "uri", "1.0.1"
|
||||
|
|
Загрузка…
Ссылка в новой задаче