mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
File.realpath can raise ENOTDIR
This commit is contained in:
parent
5ad2dfd8dc
commit
a1a198d03a
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ class MSpecScript
|
||||||
patterns.each do |pattern|
|
patterns.each do |pattern|
|
||||||
begin
|
begin
|
||||||
expanded = File.realpath(pattern)
|
expanded = File.realpath(pattern)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT, Errno::ENOTDIR
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if File.file?(expanded) && expanded.end_with?('.rb')
|
if File.file?(expanded) && expanded.end_with?('.rb')
|
||||||
|
|
Loading…
Add table
Reference in a new issue