From: Hugh Sasse Staff Elec Eng Date: 2001-11-17T05:02:50+09:00 Subject: [ruby-talk:25646] Re: Funky file.each_byte On Sat, 17 Nov 2001, Tyler wrote: > Howdy! I was filtering some files and ran into an anomaly. > I'm running Ruby 1.6.4 on an old Windows machine. Everything [...] > count = 0 > f = File.new( ARGV[0], "r") Presumably you do want to count each and every byte, including 0x0a and 0x0d if they occur? :-) f = File.new( ARGV[0], "rb") Binary, not text. > f.each_byte do > count += 1 > end > f.close Hugh