#DOCUMENTATION by stefan
authorStefan Vogel <sv@exept.de>
Mon, 09 Oct 2017 17:47:23 +0200
changeset 22295 d47bb2912953
parent 22294 d7472fb0e5e5
child 22296 5abec1c29d53
#DOCUMENTATION by stefan class: OrderedCollection class changed: #new:withAll:
OrderedCollection.st
--- a/OrderedCollection.st	Mon Oct 09 17:41:45 2017 +0200
+++ b/OrderedCollection.st	Mon Oct 09 17:47:23 2017 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -270,15 +268,15 @@
     "return a new collection of size, where all elements are
      initialized to element."
 
-    |newCollection|
-
-    newCollection := self newWithSize:size.
-    newCollection atAllPut:element.
-    ^ newCollection
+    ^ (self newWithSize:size)
+        atAllPut:element;
+        yourself.
 
     "
      OrderedCollection new:10 withAll:1234
     "
+
+    "Modified: / 09-10-2017 / 17:04:11 / stefan"
 !
 
 newFrom:aCollection