summaryrefslogtreecommitdiff
path: root/spec/mspec/lib/mspec/utils/script.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-25 23:31:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-09-25 23:31:22 +0000
commitac1783578206076f81aeaa6ef4d71794d1ab9d5d (patch)
tree3861db540044ece1f1b7ba8ee13bae1ef5a1e734 /spec/mspec/lib/mspec/utils/script.rb
parent3abbaab1a7a97d18f481164c7dc48749b86d7f39 (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. reapply r64749 and r64751 overridden by r64830. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/mspec/lib/mspec/utils/script.rb')
-rw-r--r--spec/mspec/lib/mspec/utils/script.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb
index db5a33a91a..2816618b0f 100644
--- a/spec/mspec/lib/mspec/utils/script.rb
+++ b/spec/mspec/lib/mspec/utils/script.rb
@@ -189,7 +189,11 @@ class MSpecScript
end
patterns.each do |pattern|
- expanded = File.expand_path(pattern)
+ begin
+ expanded = File.realpath(pattern)
+ rescue Errno::ENOENT
+ next
+ end
if File.file?(expanded) && expanded.end_with?('.rb')
return [expanded]
elsif File.directory?(expanded)