[Pharo-project] Bug in FileSystem

csrabak at bol.com.br csrabak at bol.com.br
Tue Jan 10 03:26:30 CET 2012


But what if count makes handle pass over the end of the file?
 
--
Cesar Rabak

Em 07/01/2012 10:10, Mariano Martinez Peck < marianopeck at gmail.com > escreveu:
FSReadStream >> next: count
 | result |
 result := ByteArray new: count.
 handle at: position read: result startingAt: 1 count: count.
  position := position + 1.
 ^ result


shouldn't be 

FSReadStream >> next: count
 | result |
 result := ByteArray new: count.
 handle at: position read: result startingAt: 1 count: count.
 position := position + count.
 ^ result
 
At least with that (among some extensions) Fuel tests pass with FS :)

Cheers

-- 
Mariano
http://marianopeck.wordpress.com
 
 



More information about the Pharo-project mailing list