ruby-changes:46597
From: naruse <ko1@a...>
Date: Sun, 14 May 2017 20:36:08 +0900 (JST)
Subject: [ruby-changes:46597] naruse:r58713 (trunk): Don't read non .rb file as a spec
naruse 2017-05-14 20:36:01 +0900 (Sun, 14 May 2017) New Revision: 58713 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58713 Log: Don't read non .rb file as a spec To avoid reading `core` file on reading core/ specs. 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 58712) +++ spec/mspec/lib/mspec/utils/script.rb (revision 58713) @@ -185,7 +185,7 @@ class MSpecScript https://github.com/ruby/ruby/blob/trunk/spec/mspec/lib/mspec/utils/script.rb#L185 patterns.each do |pattern| expanded = File.expand_path(pattern) - if File.file?(expanded) + if File.file?(expanded) && expanded.end_with?('.rb') return [expanded] elsif File.directory?(expanded) return Dir["#{expanded}/**/*_spec.rb"].sort -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/