[squeak-dev] The Inbox: Collections-fbs.456.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Sep 9 10:51:19 UTC 2011

A new version of Collections was added to project The Inbox:

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

Name: Collections-fbs.456
Author: fbs
Time: 9 September 2011, 11:51:06.387 am
UUID: a66665f4-54c0-4023-b9cd-ba67db31fdc9
Ancestors: Collections-eem.455

Mantis #7666: typo in Dictionary class >> #newFromPairs.

=============== Diff against Collections-eem.455 ===============

Item was changed:
  ----- Method: Dictionary class>>newFromPairs: (in category 'instance creation') -----
  newFromPairs: anArray 
+ 	"Answer an instance of me associating (anArray at:i) to (anArray at: i+1)
- 	"Answer an instance of me associating (anArray at:i) to (anArray at: i+i)
  	 for each odd i.  anArray must have an even number of entries."
  	| newDictionary |
  	newDictionary := self new: (anArray size/2).
  	1 to: (anArray size-1) by: 2 do: [ :i|
  		newDictionary at: (anArray at: i) put: (anArray at: i+1).
  	^ newDictionary
  	"  Dictionary newFromPairs: {'Red' . Color red . 'Blue' . Color blue . 'Green' . Color green}. "!

More information about the Squeak-dev mailing list