[comp.lang.smalltalk] Bug in Interval>>collect:

hmm@laura.informatik.uni-dortmund.de (Martin Mosner) (03/19/87)

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