The Trunk: Collections-nice.774.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-nice.774.mcz

Nicolas Cellier uploaded a new version of Collections to project The Trunk:

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

Name: Collections-nice.774
Author: nice
Time: 1 December 2017, 12:08:06.998278 am
UUID: d8c8b26f-2bca-438d-9b75-b929e5290df3
Ancestors: Collections-nice.773

Fulfill gratuitous ANSI expectation about
(1 to: 2) readStream contents class

This will fix ReadStreamTest>>#testContents2 that I broke with my implementation of Interval>>copyFrom:to:.

The expectation:
either contents answers the interval itself (please tell me why a shallow copy would not be acceptable???) or it answers same class as select: (that would be the interval species).

=============== Diff against Collections-nice.773 ===============

Item was changed:
  ----- Method: Interval>>copyFrom:to: (in category 'copying') -----
  copyFrom: startIndex to: stopIndex
+ (startIndex = 1 and: [stopIndex = self size]) ifTrue: [^self].
  stopIndex < startIndex ifTrue: [^self copyEmpty].
  ^(self at: startIndex) to: (self at: stopIndex) by: step!