I want to iteratively read a fixed number of bytes in a file, and return them
My code is below. I have taken it from an example on the internet
File.open('textfile.txt') do |file|
while (buffer = file.read(size)) do
yield buffer
end
end
I get the error no block given.