From: rtilley Date: 2006-03-19T08:43:48+09:00 Subject: safe way to calc md5 on very large files I'm calculating md5 checksums on very large files (2 GB). This is a safe way to do so, right? Also... is the file closed when the block exits? I'm using 'rb' as this is used on Windows and Linux computers. md5 = Digest::MD5.new() File.open(file, 'rb').each {|line| md5.update(line)}