ruby-changes:55946
From: Nobuyoshi <ko1@a...>
Date: Sat, 1 Jun 2019 15:06:32 +0900 (JST)
Subject: [ruby-changes:55946] Nobuyoshi Nakada: 3034d666e8 (trunk): Just use `File.readlines`
https://git.ruby-lang.org/ruby.git/commit/?id=3034d666e8 From 3034d666e8015caa05c55a46debd5ed1ff502d47 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 1 Jun 2019 14:57:36 +0900 Subject: Just use `File.readlines` diff --git a/lib/reline/config.rb b/lib/reline/config.rb index eddce36..aa65037 100644 --- a/lib/reline/config.rb +++ b/lib/reline/config.rb @@ -80,9 +80,7 @@ class Reline::Config https://github.com/ruby/ruby/blob/trunk/lib/reline/config.rb#L80 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/