diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-27 16:38:32 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2023-02-27 18:49:18 +0900 |
commit | db0a4c8923e0e084c7d757d132a83fc9c8431633 (patch) | |
tree | 1ea1f2e494962c6e8c024bd1a60719f305a40341 /tool/lib | |
parent | d063ed12afcb56d919863d6efb4bfa92741c1555 (diff) | |
download | ruby-db0a4c8923e0e084c7d757d132a83fc9c8431633.tar.gz |
Prefer to use File.foreach instead of IO.foreach
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/memory_status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/lib/memory_status.rb b/tool/lib/memory_status.rb index 5e9e80a68a..60632523a8 100644 --- a/tool/lib/memory_status.rb +++ b/tool/lib/memory_status.rb @@ -12,7 +12,7 @@ module Memory PROC_FILE = procfile VM_PAT = pat def self.read_status - IO.foreach(PROC_FILE, encoding: Encoding::ASCII_8BIT) do |l| + File.foreach(PROC_FILE, encoding: Encoding::ASCII_8BIT) do |l| yield($1.downcase.intern, $2.to_i * 1024) if VM_PAT =~ l end end |