1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Set encoding as ASCII-8BIT. [Bug #6027]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-02-14 20:13:27 +00:00
parent 0da31416f1
commit 1c923eb230

View file

@ -7,7 +7,7 @@ module Memory
PROC_FILE = procfile
VM_PAT = /^Vm(\w+):\s+(\d+)/
def self.read_status
IO.foreach(PROC_FILE) do |l|
IO.foreach(PROC_FILE, encoding: Encoding::ASCII_8BIT) do |l|
yield($1.downcase.intern, $2.to_i * 1024) if VM_PAT =~ l
end
end