Possible bug with Streams and upToEnd

Russell Penney russell.penney at tincanct.com
Mon Jul 12 13:42:44 UTC 2004


I was playing with streams and noticed something a bit weird.

 

| s |

s := ReadStream on: ( ByteArray new: 10 withAll: 32 ).

s upToEnd

->  a ByteArray(32 32 32 32 32 32 32 32 32 32)

 

| s |

s := ReadWriteStream on: ( ByteArray new: 10 withAll: 32 ).

s upToEnd

-> a ByteArray()

 

Is that right? Should they both return the same collection? Seems very
counter-intuitive to me as it is now, but I might be missing something.

 

Russell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20040712/2ce5e5a9/attachment.htm


More information about the Squeak-dev mailing list