[ruby/optparse] Use class methods of File
over IO
https://github.com/ruby/optparse/commit/ab5073e4d8
This commit is contained in:
parent
c9fbc779a6
commit
e2b15461a7
@ -1925,7 +1925,7 @@ XXX
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
parse(*IO.readlines(filename).each {|s| s.chomp!}, into: into)
|
parse(*File.readlines(filename, chomp: true), into: into)
|
||||||
true
|
true
|
||||||
rescue Errno::ENOENT, Errno::ENOTDIR
|
rescue Errno::ENOENT, Errno::ENOTDIR
|
||||||
false
|
false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user