aboutsummaryrefslogtreecommitdiffstats
path: root/lib/timeout.rb
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-05 15:48:11 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-05 15:48:11 +0000
commit61f46bafa47df9d5aa9bd79b565a3d8bf44b946c (patch)
treed6bf9cf2f1b95ae22f30821b6af826b90466253b /lib/timeout.rb
parent1b648d04673813185cd92653813905ebcf3bd9aa (diff)
downloadruby-61f46bafa47df9d5aa9bd79b565a3d8bf44b946c.tar.gz
adjust style and fix typo and indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r--lib/timeout.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index 12c110647e..da4eae39a1 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -48,7 +48,7 @@ module Timeout
# Timeout</tt> into your classes so they have a #timeout method, as well as
# a module method, so you can call it directly as Timeout.timeout().
def timeout(sec, klass = nil, immediate: false) #:yield: +sec+
- return yield(sec) if sec == nil or sec.zero?
+ return yield(sec) if sec == nil or sec.zero?
Thread.async_interrupt_timing(klass ? klass : ExitException => immediate ? :immediate : :on_blocking) do
exception = klass || Class.new(ExitException)
begin