зеркало из https://github.com/github/ruby.git
[ruby/optparse] Use class methods of `File` over `IO`
https://github.com/ruby/optparse/commit/ab5073e4d8
This commit is contained in:
Родитель
c9fbc779a6
Коммит
e2b15461a7
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче