1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

timeout.rb: internal constants

* lib/timeout.rb (Timeout): make internal constants private.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-07-13 04:50:20 +00:00
parent d7de6e77b6
commit 42f1ff1272

View file

@ -48,6 +48,7 @@ module Timeout
# :stopdoc: # :stopdoc:
THIS_FILE = /\A#{Regexp.quote(__FILE__)}:/o THIS_FILE = /\A#{Regexp.quote(__FILE__)}:/o
CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0 CALLER_OFFSET = ((c = caller[0]) && THIS_FILE =~ c) ? 1 : 0
private_constant *%I[THIS_FILE CALLER_OFFSET]
# :startdoc: # :startdoc:
# Perform an operation in a block, raising an error if it takes longer than # Perform an operation in a block, raising an error if it takes longer than