diff options
Diffstat (limited to 'spec/mspec')
-rw-r--r-- | spec/mspec/lib/mspec/utils/script.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/mspec/lib/mspec/utils/script.rb b/spec/mspec/lib/mspec/utils/script.rb index 6e47b94fd6..2816618b0f 100644 --- a/spec/mspec/lib/mspec/utils/script.rb +++ b/spec/mspec/lib/mspec/utils/script.rb @@ -189,10 +189,11 @@ class MSpecScript end patterns.each do |pattern| - expanded = File.realpath(pattern) - rescue Errno::ENOENT - next - else + begin + expanded = File.realpath(pattern) + rescue Errno::ENOENT + next + end if File.file?(expanded) && expanded.end_with?('.rb') return [expanded] elsif File.directory?(expanded) |