[ruby/optparse] Use class methods of `File` over `IO`

https://github.com/ruby/optparse/commit/ab5073e4d8
This commit is contained in:
Nobuyoshi Nakada 2022-11-21 18:28:33 +09:00 коммит произвёл git
Родитель c9fbc779a6
Коммит e2b15461a7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -1925,7 +1925,7 @@ XXX
}
end
begin
parse(*IO.readlines(filename).each {|s| s.chomp!}, into: into)
parse(*File.readlines(filename, chomp: true), into: into)
true
rescue Errno::ENOENT, Errno::ENOTDIR
false