PositionnableStream>>isEmpty is wrong

Ron Teitelbaum Ron at USMedRec.com
Tue Feb 27 15:27:40 UTC 2007


+1 

I looked at the hierarchy to make sure that buffered streams would not be
affected but I found that the places that this would be a problem were not
subclasses of PositionableStream.  Like SocketStream and SharedQueue ...

(makes sense since position = 0 would have been wrong anyway)

Ron Teitelbaum

> From: Damien Cassou 
> Sent: Tuesday, February 27, 2007 10:19 AM
> 
> I have implemented the fix (very simple), 1 test for ReadStream,
> WriteStream and ReadWriteStream. I will open a new bug on mantis and
> commit the changeset.
> 
> Correction:
> 
> isEmpty
>   "Answer whether the receiver's contents has no elements."
> 
>   "Returns true if both the set of past and future sequence values of
> the receiver are empty. Otherwise returns false"
> 
>   ^ self atEnd and: [position = 0]
> 
> Comments ?
> 
> --
> Damien Cassou





More information about the Squeak-dev mailing list