Do not need quotes in #storeString when a symbol contains a ':'.
authorStefan Vogel <sv@exept.de>
Fri, 13 Feb 1998 22:31:32 +0100
changeset 3285 bd5827c97b21
parent 3284 195d12030024
child 3286 c6987c5f15a8
Do not need quotes in #storeString when a symbol contains a ':'.
Symbol.st
--- a/Symbol.st	Fri Feb 13 14:09:44 1998 +0100
+++ b/Symbol.st	Fri Feb 13 22:31:32 1998 +0100
@@ -477,19 +477,22 @@
 storeString
     "return a String for storing the receiver"
 
-    |sz|
+    |sz c|
 
     (sz := self size) > 0 ifTrue:[  "/ sigh
-	(self at:1) isLetter ifTrue:[
-	    2 to:sz do:[:index |
-		(self at:index) isLetterOrDigit ifFalse:[
-		    ^ '#''' , self , ''''
-		].
-	    ].
-	    ^ '#' , self
-	]
+        (self at:1) isLetter ifTrue:[
+            2 to:sz do:[:index |
+                ((c := self at:index) isLetterOrDigit 
+                 or:[c == $:]) ifFalse:[
+                    ^ '#''' , self , ''''
+                ].
+            ].
+            ^ '#' , self
+        ]
     ].
     ^ '#''' , self , ''''
+
+    "Modified: / 13.2.1998 / 21:38:15 / stefan"
 ! !
 
 !Symbol methodsFor:'queries'!
@@ -588,5 +591,5 @@
 !Symbol class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.48 1997-11-02 18:36:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Symbol.st,v 1.49 1998-02-13 21:31:32 stefan Exp $'
 ! !