#TUNING by stefan
authorStefan Vogel <sv@exept.de>
Mon, 09 Oct 2017 17:50:30 +0200
changeset 22297 8ce92cf4fafc
parent 22296 5abec1c29d53
child 22298 ce67a7045fed
#TUNING by stefan class: Interval changed: #collect:
Interval.st
--- a/Interval.st	Mon Oct 09 17:48:33 2017 +0200
+++ b/Interval.st	Mon Oct 09 17:50:30 2017 +0200
@@ -300,10 +300,12 @@
      Redefined since the inherited method (SeqColl) accesses the receiver via at:, 
      which is slow for intervals"
 
-    |elementValue mySize newCollection|
+    |elementValue newCollection
+     mySize "{Class: SmallInteger}"|
 
     elementValue := start.
-    newCollection := self species newWithSize:(mySize := self size).
+    mySize := self size.
+    newCollection := self species newWithSize:mySize.
     1 to: mySize do:[:i |
         newCollection at:i put:(aBlock value:elementValue).
         elementValue := elementValue + step.
@@ -315,6 +317,7 @@
     "
 
     "Modified: / 04-05-2012 / 13:03:56 / cg"
+    "Modified: / 09-10-2017 / 16:59:10 / stefan"
 !
 
 do:aBlock