[squeak-dev] The Trunk: Collections-ar.326.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 5 04:35:16 UTC 2010

Andreas Raab uploaded a new version of Collections to project The Trunk:

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

Name: Collections-ar.326
Author: ar
Time: 4 March 2010, 8:34:47.942 pm
UUID: e1937a7e-6776-7d4a-bd13-9956ad3ea411
Ancestors: Collections-cmm.325

Fix implementation of at:ifPresent:ifAbsent:.

=============== Diff against Collections-cmm.325 ===============

Item was changed:
  ----- Method: Dictionary>>at:ifPresent:ifAbsent: (in category 'accessing') -----
  at: key ifPresent: oneArgBlock ifAbsent: absentBlock
  	"Lookup the given key in the receiver. If it is present, answer the value of evaluating the oneArgBlock with the value associated with the key, otherwise answer the value of absentBlock."
+ 	self at: key ifPresent:[:v| ^oneArgBlock value: v].
+ 	^absentBlock value!
- 	^(self
- 		at: key
- 		ifPresent: oneArgBlock) ifNil: absentBlock!

More information about the Squeak-dev mailing list