[Pkg] The Trunk: Collections-nice.343.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Mar 20 07:09:31 UTC 2010

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

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

Name: Collections-nice.343
Author: nice
Time: 20 March 2010, 8:09:12.409 am
UUID: 8de2776c-4240-b04a-9295-397608c5a202
Ancestors: Collections-nice.342

Let add: answer the added object argument

=============== Diff against Collections-nice.342 ===============

Item was changed:
  ----- Method: RunArray>>addLast: (in category 'adding') -----
  addLast: value
  	"Add value as the last element of the receiver."
  	lastIndex := nil.  "flush access cache"
  	(runs size=0 or: [values last ~= value])
  		[runs := runs copyWith: 1.
  		values := values copyWith: value]
+ 		[runs at: runs size put: runs last+1].
+ 	^value!
- 		[runs at: runs size put: runs last+1]!

More information about the Packages mailing list