summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2022-11-21 18:28:33 +0900
committergit <[email protected]>2022-11-21 10:26:42 +0000
commite2b15461a7dc645f4562e1d1a3f0f89973794258 (patch)
treeef4fad755d381cad4fd61b6ea3b688aea6cc3aa7 /lib/optparse.rb
parentc9fbc779a680f3e1fd884ec80722cd32a990e0e9 (diff)
[ruby/optparse] Use class methods of `File` over `IO`
https://github.com/ruby/optparse/commit/ab5073e4d8
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 238fa1e219..7ddde82342 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -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