ios.each_byte {|byte| block } â ios
ios.each_byte â an_enumerator
ios.each_byte â an_enumerator
Instance Public methods
Calls the given block once for each byte (0..255) in ios, passing
the byte as an argument. The stream must be opened for reading or an
IOError
will be raised.
If no block is given, an enumerator is returned instead.
f = File.new("testfile") checksum = 0 f.each_byte {|x| checksum ^= x } #=> #<File:testfile> checksum #=> 12
Please login to continue.