diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-11-25 14:22:37 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-12-01 02:28:49 +0900 |
commit | d752cf7601adbe4bc2dc658effc2f61563a7dfb7 (patch) | |
tree | 7acc875d1933b330f96c7e3d7a31d61da5e77387 /sample/from.rb | |
parent | a0b0365e905e1ac51998ace7e6fc723406a2f157 (diff) |
Use class methods of `File` over `Kernel.open` and `IO.read`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6834
Diffstat (limited to 'sample/from.rb')
-rw-r--r-- | sample/from.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/from.rb b/sample/from.rb index db1299c869..0e5a08de5f 100644 --- a/sample/from.rb +++ b/sample/from.rb @@ -62,7 +62,7 @@ def from_main if File.exist?(file) atime = File.atime(file) mtime = File.mtime(file) - open(file, "r") do |f| + File.open(file, "r") do |f| until f.eof? header = {} f.each_line do |line| |