each_byte is always associated with a block.
file5 = File.new("C:\\Ruby\\Sample") file5.each_byte{|ch| putc ch}