summaryrefslogtreecommitdiff
path: root/lib/reline/config.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-01 14:57:36 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-06-01 14:57:36 +0900
commit3034d666e8015caa05c55a46debd5ed1ff502d47 (patch)
treecb786b71c5d59db1efe5c2f7f1d58e311a0067a4 /lib/reline/config.rb
parentb487b39b8597daf066fb1e1e7d3087ac694a0d3a (diff)
Just use `File.readlines`
Diffstat (limited to 'lib/reline/config.rb')
-rw-r--r--lib/reline/config.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/reline/config.rb b/lib/reline/config.rb
index eddce36eba..aa65037c67 100644
--- a/lib/reline/config.rb
+++ b/lib/reline/config.rb
@@ -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