summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-08 04:35:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-08 04:35:13 +0000
commitb4b9183ffc44b03a12d7a4c3abfdc8bf9d197454 (patch)
treef92388d0ad6b72c06be65af9ef5f062c4347e8d1 /lib
parent844ddfdd0da7f06edfda1fa960fd1609d1264565 (diff)
lib/test/unit.rb: remove exact trace
* lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid of IndexError, which could caused by modified $@ sometimes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 85e6885fab..ed465e97a6 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -792,11 +792,12 @@ end
class MiniTest::Unit::TestCase
undef run_test
+ RUN_TEST_TRACE = "#{__FILE__}:#{__LINE__+3}:in `run_test'".freeze
def run_test(name)
progname, $0 = $0, "#{$0}: #{self.class}##{name}"
self.__send__(name)
ensure
- $@[-caller.size, 1] = [] if $@
+ $@.delete(RUN_TEST_TRACE) if $@
$0 = progname
end
end