<div dir="ltr">I suspect that is because ReadWriteStream is built to work roughly like FileStreams- except over other arbitrary collections.  Basically, let's you read at arbitrary spots, go back, overwrite those spots, and then continue on.  As such, I would think #contents is exactly the right behavior.  Take this example:<div><br></div><div>|stream| stream := ReadWriteStream on: 'Chirs'.</div><div>stream next; contents.  "---< 'Chris' - the contents of the underlying collection, not some adhoc part."</div><div><br></div><div>What you are probably looking for is #resetToStart (which if you used in your example would not have surprised you - although the name surprised me).</div><div><br></div><div>-cbc</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 1, 2018 at 1:00 PM, Chris Muller <span dir="ltr"><<a href="mailto:ma.chris.m@gmail.com" target="_blank">ma.chris.m@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does anyone know why ReadWriteStream overrides #contents from WriteStream?<div><br></div><div>WriteStream behaves as I would expect</div><div><br></div><div><div>   |stream| stream := WriteStream on: String new.</div><div>   stream nextPutAll: 'chris'; reset; nextPutAll: 'C'; contents     "--->  'C'   as expected"<br></div></div><div><br></div><div>but ReadWriteStream doesn't...</div><div><br></div><div><div>   |stream| stream := ReadWriteStream on: String new.</div><div>   stream nextPutAll: 'chris'; reset; nextPutAll: 'C'; contents     "---> 'Chris'   unexpected!"</div></div><div><br></div><div>I want to reuse a ReadWriteStream, so I want #contents to honor the end position.  What's going on here?</div></div>
<br><br>
<br></blockquote></div><br></div>