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:
parent
b487b39b85
commit
3034d666e8
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue