Array.st
changeset 14158 8565a6b7f00a
parent 13077 87f8b675848f
child 14256 45d30f2f4724
--- a/Array.st	Tue Jun 05 14:29:47 2012 +0200
+++ b/Array.st	Thu Jun 07 11:08:32 2012 +0200
@@ -431,8 +431,19 @@
 asImmutableArray
     "return a write-protected copy of myself"
 
-    self assert:(ImmutableArray notNil).
-    ^ self copy changeClassTo:ImmutableArray
+    "/ self assert:(ImmutableArray notNil).
+    ^ self copy beImmutable
+
+    "Modified: / 07-06-2012 / 11:06:48 / cg"
+!
+
+beImmutable
+    "make myself write-protected"
+
+    "/ self assert:(ImmutableArray notNil).
+    self changeClassTo:ImmutableArray
+
+    "Created: / 07-06-2012 / 11:06:33 / cg"
 ! !
 
 !Array methodsFor:'copying'!
@@ -2527,9 +2538,9 @@
 !Array class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.149 2010-09-21 06:57:51 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.150 2012-06-07 09:08:32 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.149 2010-09-21 06:57:51 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Array.st,v 1.150 2012-06-07 09:08:32 cg Exp $'
 ! !