'From Squeak3.2gamma of 15 January 2002 [latest update: #4827] on 15 May 2002 at 9:57:19 am'! "Change Set: PastEndPut-gh Date: 15 May 2002 Author: Gšran Hultgren Tweaked the implementation of WriteStream>>pastEndPut:. The growth limit was raised from 20000 to 1000000 and the implementation of growth was improved. "! !WriteStream methodsFor: 'private' stamp: 'gh 5/15/2002 09:55'! pastEndPut: anObject "Grow the collection by creating a new bigger collection and then copy over the contents from the old one. We grow by doubling the size but the growth is kept between 20 and 1000000. Finally we put at the current write position." | oldSize grownCollection | oldSize _ collection size. grownCollection _ collection class new: oldSize + ((oldSize max: 20) min: 1000000). collection _ grownCollection replaceFrom: 1 to: oldSize with: collection startingAt: 1. writeLimit _ collection size. collection at: (position _ position + 1) put: anObject! !