mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
844ddfdd0d
commit
b4b9183ffc
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue May 8 13:35:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
|
||||
of IndexError, which could caused by modified $@ sometimes.
|
||||
|
||||
Tue May 8 11:21:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* test/minitest/metametameta.rb (MetaMetaMetaTestCase#assert_report):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue