aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-14 11:36:01 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-14 11:36:01 +0000
commit95590be3b1adbf1873f6c4feb2f4d21d49bd0d36 (patch)
treee21d0db27b757970741f68113ed8d44eab98a21c /spec
parentfd3a2473dc167adbcbb65c28b8f954e704fdc7d9 (diff)
downloadruby-95590be3b1adbf1873f6c4feb2f4d21d49bd0d36.tar.gz
Don't read non .rb file as a spec
To avoid reading `core` file on reading core/ specs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r--spec/mspec/lib/mspec/utils/script.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb
index 28be854a85..3e507d2b4a 100644
--- a/spec/mspec/lib/mspec/utils/script.rb
+++ b/spec/mspec/lib/mspec/utils/script.rb
@@ -185,7 +185,7 @@ class MSpecScript
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