[TEST] PositionableStream >> upToEnd (was: Use of EndOfStream)
Boris.Gaertner at gmx.net
Thu Feb 19 13:39:54 UTC 2004
At Feb 17, Bill Schwab posted some important thoughts about
the use of the EndOfStream exception. I think his proposals
are worth being given a try, and I will rework the EndOfStream
stuff (this will come as a separate mail)
During my very first experiment with a different defaultAction
for EndOfStream, I came across a strange bug:
uses this copy loop:
[(el _ self next) == nil] whileFalse: [ newStream nextPut: el ].
This is clearly wrong and should be replaced with:
[self atEnd] whileFalse: [newStream nextPut: self next].
I will post a separate fix (for this is a bug that has nothing to
do with the EndOfStream stuff, we have to fix it even if we
decide later that we do not want to use the EndOfStream
exception.), but attached you find a test that demonstrates
the bug. The change set contains a single method for
class StreamBugz which is part of change set # 5683.
Without that change set , you will not be able to file in
the attachment, but you can copy the method into a
workspace and play with it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1049 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040219/0b12d94a/TestStream.1.obj
More information about the Squeak-dev