From a2b889f4ab6162bb3abee745b0eaa28ee8802829 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 11 Jul 2015 03:45:54 +0000 Subject: timeout.rb: fix backtrace * lib/timeout.rb (Timeout#timeout): remove regexp with wrong line nuber and fix caller depth. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/timeout.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/timeout.rb') 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 -- cgit v1.2.3