The Trunk: Collections-dtl.821.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-dtl.821.mcz

commits-2
David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.821.mcz

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

Name: Collections-dtl.821
Author: dtl
Time: 16 February 2019, 6:18:27.925895 pm
UUID: 9bfa29b3-5e9f-4c61-b19b-e0bb05403589
Ancestors: Collections-nice.820

Classes are expected to be unique in the system, but in some cases (e.g. Magma) it is also useful to expect a proxy for a class to test equivalent to the actual class. Therefore, in SequenceableCollection>>= use #= rather than #== for the class comparison.

=============== Diff against Collections-nice.820 ===============

Item was changed:
  ----- Method: SequenceableCollection>>= (in category 'comparing') -----
  = otherCollection
  "Answer true if the receiver is equivalent to the otherCollection.
  First test for identity, then rule out different class and sizes of
  collections. As a last resort, examine each element of the receiver
  and the otherCollection."
 
  self == otherCollection ifTrue: [^ true].
+ self class = otherCollection class ifFalse: [^ false].
- self class == otherCollection class ifFalse: [^ false].
  ^ self hasEqualElements: otherCollection!