diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-14 00:28:10 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-12-14 00:28:10 +0000 |
commit | 834e3662ba8c87633d7b90640f5c4bead594d845 (patch) | |
tree | bc0cc99321d1bc94c24503c2f3c8b3c74a34f37e /lib/minitest/unit.rb | |
parent | 365d27a8b9dc500ad3afc7857f4f28f6bfc55e3b (diff) | |
download | ruby-834e3662ba8c87633d7b90640f5c4bead594d845.tar.gz |
reverts r20713
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/minitest/unit.rb')
-rw-r--r-- | lib/minitest/unit.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/minitest/unit.rb b/lib/minitest/unit.rb index 7807e2e3eb..77176240c5 100644 --- a/lib/minitest/unit.rb +++ b/lib/minitest/unit.rb @@ -336,12 +336,8 @@ p $! end def location e - e.backtrace.reverse.inject(""){ |last, s| - if s =~ /in .(assert|refute|flunk$|pass$|fail$|raise$)/ - break last - else - s - end + e.backtrace.find { |s| + s !~ /in .(assert|refute|flunk|pass|fail|raise)/ }.sub(/:in .*$/, '') end |