[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 committed by git
parent c9fbc779a6
commit e2b15461a7

View File

@ -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