#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Wed, 29 Aug 2018 16:27:02 +0200
changeset 23319 ef16ff70d461
parent 23318 0c42190db1fb
child 23320 50cd7d7c8750
#BUGFIX by cg class: Collection #detectMax: #detectMin:
Collection.st
--- a/Collection.st	Wed Aug 29 15:28:13 2018 +0200
+++ b/Collection.st	Wed Aug 29 16:27:02 2018 +0200
@@ -361,6 +361,10 @@
 ! !
 
 
+
+
+
+
 !Collection methodsFor:'Compatibility-ANSI'!
 
 identityIncludes:anObject
@@ -2885,10 +2889,10 @@
      If the receiver collection is empty, return nil.  
      This method might also be called elect:."
 
-    | maxElement |
+    | maxElement maxValue |
 
     self do: [:each | 
-        | val maxValue |
+        | val |
 
         val := aBlockOrSymbol value: each.
         "Note that there is no way to get the first element 
@@ -2907,6 +2911,7 @@
 
     "Created: / 20-08-2011 / 21:34:49 / cg"
     "Modified (format): / 20-03-2018 / 14:57:42 / stefan"
+    "Modified (format): / 29-08-2018 / 16:25:27 / Claus Gittinger"
 !
 
 detectMin: aBlockOrSymbol
@@ -2914,10 +2919,10 @@
      Answer the element for which aBlock evaluates to the lowest number.
      If the receiver collection is empty, return nil."
 
-    | minElement |
+    | minElement minValue |
 
     self do: [:each | 
-        | val minValue |
+        | val |
 
         val := aBlockOrSymbol value: each.
         "Note that there is no way to get the first element 
@@ -2936,6 +2941,7 @@
 
     "Created: / 20-08-2011 / 21:35:13 / cg"
     "Modified (format): / 20-03-2018 / 14:57:56 / stefan"
+    "Modified (format): / 29-08-2018 / 16:25:39 / Claus Gittinger"
 !
 
 do:aBlock