A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-cwp.663.mcz==================== Summary ====================
Name: System-cwp.663
Author: cwp
Time: 12 January 2014, 2:17:20.037 pm
UUID: 195900d2-3b5e-42a0-833e-fa1bbc8eecfd
Ancestors: System-cwp.661
Allow the block passed to #allObjectsDo: to use #become: on its argument.
=============== Diff against System-cwp.661 ===============
Item was changed:
----- Method: SystemNavigation>>allObjectsDo: (in category 'query') -----
allObjectsDo: aBlock
"Evaluate the argument, aBlock, for each object in the system
excluding SmallIntegers. With closures, this needs to use an end
marker (lastObject) since activation of the block will create new
+ contexts and cause an infinite loop. nextObject must be fetched
+ before the block is evaluated, becase the block may use #become:
+ to change the identity of object"
+
+ | object nextObject lastObject |
- contexts and cause an infinite loop."
- | object lastObject |
object := self someObject.
lastObject := Object new.
+ [nextObject := object nextObject.
+ aBlock value: object.
+ object := nextObject.
+ lastObject == object]
+ whileFalse.!
- [lastObject == object or: [0 == object]]
- whileFalse: [aBlock value: object.
- object := object nextObject]!