1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

get rid of newer syntax for old versions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-09-15 11:45:31 +00:00
parent 893949167b
commit 0d7facee42

View file

@ -189,10 +189,11 @@ class MSpecScript
end end
patterns.each do |pattern| patterns.each do |pattern|
expanded = File.realpath(pattern) begin
rescue Errno::ENOENT expanded = File.realpath(pattern)
next rescue Errno::ENOENT
else next
end
if File.file?(expanded) && expanded.end_with?('.rb') if File.file?(expanded) && expanded.end_with?('.rb')
return [expanded] return [expanded]
elsif File.directory?(expanded) elsif File.directory?(expanded)