The Trunk: Collections-mt.846.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-mt.846.mcz

commits-2
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.846.mcz

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

Name: Collections-mt.846
Author: mt
Time: 23 July 2019, 9:33:10.753815 am
UUID: 0e0c1523-750b-9148-80c2-8730995b997d
Ancestors: Collections-mt.845

Fixes #collect:as: for Set into Dictionary. See CollectionsTests-pre.314.

Thanks to Levente for the idea!

=============== Diff against Collections-mt.845 ===============

Item was changed:
  ----- Method: Dictionary>>fillFrom:with: (in category 'private') -----
  fillFrom: aCollection with: aBlock
  "Evaluate aBlock with each of aCollections's elements as the argument.  
  Collect the resulting values into self. Answer self."
 
+ aCollection isDictionary
+ ifFalse:
- aCollection isSequenceable
- ifTrue:
  [aCollection associationsDo:
  [ :element | self add: (aBlock value: element)]]
+ ifTrue:
- ifFalse:
  [aCollection keysAndValuesDo:
  [ :key :value | self at: key put: (aBlock value: value)]]!