[squeak-dev] Bug in SortedCollection

Ricardo Moran richi.moran at gmail.com
Tue Jul 28 21:20:08 UTC 2009


Thanks! I will try that

On Tue, Jul 28, 2009 at 6:14 PM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

> 2009/7/28 Ricardo Moran <richi.moran at gmail.com>:
> > Hi, today I found this:
> >
> > a := Object new -> 1.
> > b := Object new -> 2.
> > c := Object new -> 3.
> > d := Object new -> 4.
> >
> > ss := {a. b. c.} asSortedCollection: [:a :b | a value < b value].
> >
> > So far, it evaluates nicely, but when I try to do the following
> >
> > ss , {d}
> >
> > I get: Object doesNotUnderstand: <
> > Perhaps this is something you don't usually do with SortedCollections but
> I
> > don't know. I believe the problem is that OrderedCollection's
> implementation
> > of #copyReplaceFrom:to:with: creates a new collection without passing it
> the
> > sortBlock. It can be easily fixed by overriding this method in
> > SortedCollection and duplicating the code but I think it's ugly.
> > What do you think?
> >
> >
>
> I think you got it right and this is a known bug
> http://bugs.squeak.org/view.php?id=6535
> The fix cannot be loaded automatically because the ordre of changes
> matters and I did not care enough of it...
> But you can load the changes in a ChangeList thru the FIleBrowser and
> manually file in change by change in the interim if you are
> interested.
>
> Nicolas
>
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090728/e9cac2bc/attachment.htm


More information about the Squeak-dev mailing list