IMO ReadWriteStream is an awfull mess and should better not be used at all.
2018-05-01 22:00 GMT+02:00 Chris Muller ma.chris.m@gmail.com:
Does anyone know why ReadWriteStream overrides #contents from WriteStream?
WriteStream behaves as I would expect
|stream| stream := WriteStream on: String new. stream nextPutAll: 'chris'; reset; nextPutAll: 'C'; contents "---> 'C' as expected"
but ReadWriteStream doesn't...
|stream| stream := ReadWriteStream on: String new. stream nextPutAll: 'chris'; reset; nextPutAll: 'C'; contents "---> 'Chris' unexpected!"
I want to reuse a ReadWriteStream, so I want #contents to honor the end position. What's going on here?