[Pharo-dev] Problem in #sorted: for some collections

Marcus Denker marcus.denker at inria.fr
Tue Aug 20 04:31:50 EDT 2013


can you add  a bug tracker entry?

On Aug 19, 2013, at 5:34 PM, Damien Cassou <damien.cassou at gmail.com> wrote:

> col := OrderedCollection new.
> col add: 1.
> col add: 3.
> col add: 2.
> col sorted.
> col
> 
> you will see that col is now sorted. This is wrong. We expect #sorted
> to return a sorted collection without changing the receiver.
> 
> This code
> 
> col := Array with: 1 with: 3 with: 2.
> col sorted.
> col
> 
> works as expected.
> 
> -- 
> Damien Cassou
> http://damiencassou.seasidehosting.st
> 
> "Success is the ability to go from one failure to another without
> losing enthusiasm."
> Winston Churchill
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20130820/d26a2efb/attachment.asc>


More information about the Pharo-dev mailing list