comment/format in: #replaceReferencesTo:with:
authorClaus Gittinger <cg@exept.de>
Sat, 10 Oct 2009 08:02:17 +0200
changeset 12194 208afdcf182b
parent 12193 471372ad0ea2
child 12195 65f344e48a03
comment/format in: #replaceReferencesTo:with:
Smalltalk.st
--- a/Smalltalk.st	Fri Oct 09 20:16:21 2009 +0200
+++ b/Smalltalk.st	Sat Oct 10 08:02:17 2009 +0200
@@ -4341,19 +4341,23 @@
 !
 
 replaceReferencesTo:anObject with:newRef
+    "if the receiver refers to the argument, anObject, replace this reference with newRef.
+     Return true, if any reference was changed.
+     Notice: this does not change the class-reference."
+
     |toAdd|
 
     toAdd := OrderedCollection new.
     self keysAndValuesDo:[:key :val |
-	(key == anObject) ifTrue:[
-	    self shouldImplement.
-	].
-	(val == anObject ) ifTrue:[
-	    toAdd add:(key -> newRef)
-	].
+        (key == anObject) ifTrue:[
+            self shouldImplement.
+        ].
+        (val == anObject ) ifTrue:[
+            toAdd add:(key -> newRef)
+        ].
     ].
     toAdd do:[:each |
-	self at:(each key) put:(each value)
+        self at:(each key) put:(each value)
     ].
 !
 
@@ -7242,9 +7246,9 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.890 2009-10-07 19:50:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.891 2009-10-10 06:02:17 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.890 2009-10-07 19:50:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.891 2009-10-10 06:02:17 cg Exp $'
 ! !