summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-07 03:58:07 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-07 03:58:07 +0000
commit8dedf08b528586b2fe9559103f34dad92389255e (patch)
tree9a0cde5df90ec19a8aa678dbca5ce5420f37683b
parent406c5252a2037ae78c199e12578bee0233bff2d3 (diff)
test/unit.rb: defined
* test/lib/test/unit.rb (Test::Unit::Statistics#record): check if @longest is set first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/lib/test/unit.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb
index 9532584..9cad662 100644
--- a/test/lib/test/unit.rb
+++ b/test/lib/test/unit.rb
@@ -601,7 +601,7 @@ module Test
def run(*args)
result = super
- if @longest
+ if defined?(@longest) and @longest
@longest.each {|suite, method, assertions, time, error|
printf "%5.2fsec(%d): %s#%s\n", time, assertions, suite, method
}