The Trunk: Collections-eem.684.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-eem.684.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.684.mcz

==================== Summary ====================

Name: Collections-eem.684
Author: eem
Time: 30 March 2016, 1:40:38.127809 pm
UUID: 3cd95866-5b71-4755-8659-1e0fbb6fbe4d
Ancestors: Collections-ul.683

Fix PositionableStream>>basicUpTo:.  It should replicate upTo:, not next:.

=============== Diff against Collections-ul.683 ===============

Item was changed:
+ ----- Method: PositionableStream>>basicUpTo: (in category 'private basic') -----
+ basicUpTo: anObject
+ "Answer a subcollection from the current access position to the
+ occurrence (if any, but not inclusive) of anObject in the receiver. If
+ anObject is not in the collection, answer the entire rest of the receiver."
+ | newStream element |
+ newStream := WriteStream on: (self collectionSpecies new: 100).
+ [self atEnd or: [(element := self next) = anObject]]
+ whileFalse: [newStream nextPut: element].
+ ^newStream contents!
- ----- Method: PositionableStream>>basicUpTo: (in category 'accessing - multibyte support') -----
- basicUpTo: anObject
-
- ^self next: anObject
- !