summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-16 18:34:41 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-16 18:34:41 +0000
commitd764be79b10ce488207ec4f3e82d2e4139b2d501 (patch)
treebc5b4d935d5bbc4023ff92ed15b6eb993d18b210 /lib
parent690a7b67ddcc3a57ebe68379d214a128e03429ae (diff)
* lib/timeout.rb (module Timeout): Hide internal constants. Patch by
Pete Higgins. [Ruby 1.9 - Bug #4701] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/timeout.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index 297b76936c..f5b76783cd 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -29,8 +29,10 @@ module Timeout
class ExitException < ::Exception # :nodoc:
end
+ # :stopdoc:
THIS_FILE = /\A#{Regexp.quote(__FILE__)}:/o
CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0
+ # :startdoc:
# Executes the method's block. If the block execution terminates before
# +sec+ seconds has passed, it returns the result value of the block.