The Trunk: Collections-nice.343.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-nice.343.mcz

commits-2
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.343.mcz

==================== 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])
   ifTrue:
  [runs := runs copyWith: 1.
  values := values copyWith: value]
   ifFalse:
+ [runs at: runs size put: runs last+1].
+ ^value!
- [runs at: runs size put: runs last+1]!