ruby-changes:47469
From: nobu <ko1@a...>
Date: Sun, 13 Aug 2017 22:43:40 +0900 (JST)
Subject: [ruby-changes:47469] nobu:r59586 (trunk): script.rb: skip empty directories
nobu 2017-08-13 22:43:36 +0900 (Sun, 13 Aug 2017) New Revision: 59586 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59586 Log: script.rb: skip empty directories * spec/mspec/lib/mspec/utils/script.rb (entries): skip empty directories so that at least one file would run. Merged https://github.com/ruby/spec/issues/459 Modified files: trunk/spec/mspec/lib/mspec/utils/script.rb Index: spec/mspec/lib/mspec/utils/script.rb =================================================================== --- spec/mspec/lib/mspec/utils/script.rb (revision 59585) +++ spec/mspec/lib/mspec/utils/script.rb (revision 59586) @@ -188,7 +188,8 @@ class MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/utils/script.rb#L188 if File.file?(expanded) && expanded.end_with?('.rb') return [expanded] elsif File.directory?(expanded) - return Dir["#{expanded}/**/*_spec.rb"].sort + specs = Dir["#{expanded}/**/*_spec.rb"].sort + return specs unless specs.empty? end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/