aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/timeout.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index cf46c1db66..ad951d2ffa 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -57,6 +57,9 @@ module Timeout
# Returns the result of the block *if* the block completed before
# +sec+ seconds, otherwise throws an exception, based on the value of +klass+.
#
+ # The exception thrown to terminate the given block cannot be rescued inside
+ # the block unless +klass+ is given explicitly.
+ #
# Note that this is both a method of module Timeout, so you can <tt>include
# 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().