End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Digest::Instance#file
file(name)
ext/digest/lib/digest.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/ext/digest/lib/digest.rb, line 63
def file(name)
File.open(name, "rb") {|f|
buf = ""
while f.read(16384, buf)
update buf
end
}
self
end
Updates the digest with the contents of a given file name and returns self.