1
0
Fork 0
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:
Koichi Sasada 2019-07-31 18:00:33 +09:00
parent 5ad2dfd8dc
commit a1a198d03a

View file

@ -191,7 +191,7 @@ class MSpecScript
patterns.each do |pattern|
begin
expanded = File.realpath(pattern)
rescue Errno::ENOENT
rescue Errno::ENOENT, Errno::ENOTDIR
next
end
if File.file?(expanded) && expanded.end_with?('.rb')