diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-11 03:45:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-11 03:45:54 +0000 |
commit | e4a5c98c098a39a4dc56893158663483350a552f (patch) | |
tree | 76f7df3fe4941a0ce818dc2f44eec4ee7b8efd11 /lib | |
parent | 41dc6c6856548bf4d21cf5213c7e3e99cac888c5 (diff) | |
download | ruby-e4a5c98c098a39a4dc56893158663483350a552f.tar.gz |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/timeout.rb | 4 |
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 |