[前][次][番号順一覧][スレッド一覧]

ruby-changes:34066

From: nobu <ko1@a...>
Date: Mon, 26 May 2014 23:36:47 +0900 (JST)
Subject: [ruby-changes:34066] nobu:r46147 (trunk): test/unit.rb: reduce error messages

nobu	2014-05-26 23:36:40 +0900 (Mon, 26 May 2014)

  New Revision: 46147

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=46147

  Log:
    test/unit.rb: reduce error messages
    
    * test/lib/test/unit.rb (non_options): reduce same error messages.

  Modified files:
    trunk/test/lib/test/unit.rb
Index: test/lib/test/unit.rb
===================================================================
--- test/lib/test/unit.rb	(revision 46146)
+++ test/lib/test/unit.rb	(revision 46147)
@@ -245,6 +245,7 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L245
     module RequireFiles # :nodoc: all
       def non_options(files, options)
         return false if !super
+        errors = {}
         result = false
         files.each {|f|
           d = File.dirname(path = File.realpath(f))
@@ -255,6 +256,8 @@ module Test https://github.com/ruby/ruby/blob/trunk/test/lib/test/unit.rb#L256
             require path unless options[:parallel]
             result = true
           rescue LoadError
+            next if errors[$!.message]
+            errors[$!.message] = true
             puts "#{f}: #{$!}"
           end
         }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]