summaryrefslogtreecommitdiff
path: root/lib/timeout.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/timeout.rb')
-rw-r--r--lib/timeout.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/timeout.rb b/lib/timeout.rb
index b57a11384f..db52a6fde5 100644
--- a/lib/timeout.rb
+++ b/lib/timeout.rb
@@ -101,9 +101,7 @@ module Timeout
else
bt = Error.catch(message, &bl)
end
- rej = /\A#{Regexp.quote(__FILE__)}:#{__LINE__-4}\z/o
- bt.reject! {|m| rej =~ m}
- level = -caller(CALLER_OFFSET).size
+ level = -caller(CALLER_OFFSET).size-2
while THIS_FILE =~ bt[level]
bt.delete_at(level)
end