#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Tue, 28 Apr 2020 16:22:11 +0200
changeset 25374 c5178797ee0c
parent 25373 f030619565e1
child 25375 b784fc06a5eb
#REFACTORING by stefan class: Collection class changed: #withAll:
Collection.st
--- a/Collection.st	Tue Apr 28 16:21:34 2020 +0200
+++ b/Collection.st	Tue Apr 28 16:22:11 2020 +0200
@@ -296,16 +296,14 @@
     "return a new Collection with all elements taken from the argument,
      aCollection"
 
-"/ Doesn't work with Iterator:
-"/    ^ (self newWithCapacity:aCollection size)
-
-    ^ self new
+    ^ (self newWithCapacity:aCollection size)
         addAll:aCollection;
         yourself.
 
 
     "
         OrderedCollection withAll:#(1 2 3 4 5 6)
+        Array withAll:#(1 2 3 4 5 6)
         Set withAll:#(1 2 3 4 5 6)
         StringCollection withAll:#('line1' 'line2' 'line3')
         String withAll:#($a $b $c)
@@ -313,6 +311,7 @@
     "
 
     "Modified (comment): / 09-11-2017 / 07:03:53 / stefan"
+    "Modified (comment): / 28-04-2020 / 16:18:53 / Stefan Vogel"
 !
 
 withSize:n