Sha256: 49f0cdf1a2740497eef2f1024c853c7b8d25e94d81ae0c32397628294c8f5db8
Contents?: true
Size: 343 Bytes
Versions: 9
Compression:
Stored size: 343 Bytes
Contents
# # calculate md5 of big files, found on usenet # if RUBY_VERSION =~ /1\.8/ # stdlib require 'md5' else # stdlib require 'digest/md5' include Digest end class MD5 def self.file(file) File.open(file, "rb") do |f| res = self.new while (data = f.read(4096)) res << data end res end end end
Version data entries
9 entries across 9 versions & 2 rubygems