Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!unido!laura!hmm From: hmm@laura.informatik.uni-dortmund.de (Martin Mosner) Newsgroups: comp.lang.smalltalk Subject: Bug in Interval>>collect: Message-ID: <10@laura.informatik.uni-dortmund.de> Date: Thu, 19-Mar-87 15:32:30 EST Article-I.D.: laura.10 Posted: Thu Mar 19 15:32:30 1987 Date-Received: Sat, 21-Mar-87 09:00:17 EST Reply-To: hmm@unido.UUCP (Hans-Martin Mosner) Distribution: world Organization: University of Dortmund, W-Germany Lines: 12 Keywords: bug There is a bug in the Interval>>collect: method of Smalltalk-80, image version 2.1 (other versions too, I guess). It first creates an array of size "self size" to store the results in it, then does a "self do:" to enumerate. However, the computed size of the interval is not always the same as the number of iterations which the "do:" will execute, at least when the interval bounds and step are floats. I have fixed it for collect: locally, but there should be a more general fix. Has anyone done it before ? Hans-Martin Mosner University of Dortmund hmm@unido.uucp -or- hmm@unido.bitnet (The news header may be a bit different, ignore it... ) D