Anonymous | Login | 01-16-2021 15:49 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0007326 | [Squeak] Collections | minor | always | 03-31-09 02:41 | 02-06-11 23:48 | ||||
Reporter | lucian3 | View Status | public | ||||||
Assigned To | leves | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | |||||||
Summary | 0007326: #sum and #average do not work properly with empty collections | ||||||||
Description | Sending #sum or #average to an empty collection will yield an "attempt to index non-existent element..." error. #sum and #average should check first to see if the collection is empty and then, if it is, either return zero (my preferred behavior) or raise a more appropriate error. | ||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
![]() |
|
(0013908 - 54 - 54 - 54 - 54 - 54 - 54) leves 11-07-10 02:21 |
This was solved by reimplementing #sum using #reduce:. |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
37 total queries executed. 31 unique queries executed. |