1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Just use File.readlines

This commit is contained in:
Nobuyoshi Nakada 2019-06-01 14:57:36 +09:00
parent b487b39b85
commit 3034d666e8
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -80,9 +80,7 @@ class Reline::Config
if file.respond_to?(:readlines)
lines = file.readlines
else
File.open(file, 'rt') do |f|
lines = f.readlines
end
lines = File.readlines(file)
end
rescue Errno::ENOENT
return nil