'From Squeak3.7alpha of 11 September 2003 [latest update: #5707] on 19 February 2004 at 2:47:03 pm'! "Change Set: PosStream-upToEnd Date: 19 February 2004 Author: Boris Gaertner When reading past the end of a stream, our implementations of #next answer the value nil, which is certainly questionable. The method PositionableStream>>upToEnd checks for nil to detect the end of a stream which is certainly wrong. It has to use atEnd. "! !PositionableStream methodsFor: 'accessing' stamp: 'BG 2/19/2004 14:06'! upToEnd "Answer a subcollection from the current access position through the last element of the receiver." | newStream | newStream _ WriteStream on: (collection species new: 100). [self atEnd] whileFalse: [ newStream nextPut: self next ]. ^ newStream contents! !