Skip to content

Commit ab5073e

Browse files
committed
Use class methods of File over IO
1 parent 51f7e06 commit ab5073e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/optparse.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,7 @@ def load(filename = nil, into: nil)
19251925
}
19261926
end
19271927
begin
1928-
parse(*IO.readlines(filename).each {|s| s.chomp!}, into: into)
1928+
parse(*File.readlines(filename, chomp: true), into: into)
19291929
true
19301930
rescue Errno::ENOENT, Errno::ENOTDIR
19311931
false

0 commit comments

Comments
 (0)