#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Thu, 15 Sep 2016 16:20:15 +0200
changeset 20391 beea43e4a428
parent 20390 57faf25b3d15
child 20392 7c3c4b3d3d0f
#OTHER by cg class: SequenceableCollection changed: #decodeFromLiteralArray: oops - did not work with ImmutableArray
SequenceableCollection.st
--- a/SequenceableCollection.st	Thu Sep 15 13:04:28 2016 +0200
+++ b/SequenceableCollection.st	Thu Sep 15 16:20:15 2016 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -87,13 +89,12 @@
      sz "{ Class: SmallInteger }"|
 
     sz := anArray size.
-    collection := self newWithSize:sz-1.
+    collection := self mutableClass newWithSize:sz-1.
     2 to:sz do:[:idx| collection at:idx-1 put:(anArray at:idx) decodeAsLiteralArray].
     ^ collection
 
     "
-     Array
-        decodeFromLiteralArray:#(Array 1 2 3)
+     Array decodeFromLiteralArray:#(Array 1 2 3)
     "
 !
 
@@ -449,7 +450,6 @@
     ^ self == SequenceableCollection
 ! !
 
-
 !SequenceableCollection methodsFor:'Compatibility-Squeak'!
 
 allButFirst
@@ -762,7 +762,6 @@
     ^ self replaceFrom:start to:stop with:anArray startingAt:repStart
 ! !
 
-
 !SequenceableCollection methodsFor:'accessing'!
 
 after:anObject
@@ -7875,7 +7874,6 @@
     "Created: 14.2.1997 / 16:13:03 / cg"
 ! !
 
-
 !SequenceableCollection methodsFor:'searching'!
 
 detect:aBlock startingAt:startIndex