summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-15 09:48:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-15 09:48:42 +0000
commit958817d50da2738317da85894d7e0331a306d2f0 (patch)
treed164c480b2ab78ac27d6940c2710062aa02997a6
parent257d00223dea3758905c9acf1aea4e3eb2dab815 (diff)
Expand spec files to realpaths
* spec/mspec/lib/mspec/utils/script.rb (MSpecScript#entries): expand the given spec path to the realpath, not to require a library by realpath and symbolic link path from the spec file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--spec/mspec/lib/mspec/utils/script.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb
index db5a33a..6e47b94 100644
--- a/spec/mspec/lib/mspec/utils/script.rb
+++ b/spec/mspec/lib/mspec/utils/script.rb
@@ -189,7 +189,10 @@ class MSpecScript
end
patterns.each do |pattern|
- expanded = File.expand_path(pattern)
+ expanded = File.realpath(pattern)
+ rescue Errno::ENOENT
+ next
+ else
if File.file?(expanded) && expanded.end_with?('.rb')
return [expanded]
elsif File.directory?(expanded)