[squeak-dev] The Trunk: Collections-cmm.533.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Sat Sep 7 17:38:50 UTC 2013
But now Number and not Number, or String not String are unordered...
1 compareSafely: '2' -> false
'2' compareSafely: 1 -> false
Shouldn't it be ^aNumber isNumber ifTrue: [self < aNumber] ifFalse: [super
compareSafely: aSymbol] ?
2013/9/7 <commits at source.squeak.org>
> Chris Muller uploaded a new version of Collections to project The Trunk:
> http://source.squeak.org/trunk/Collections-cmm.533.mcz
>
> ==================== Summary ====================
>
> Name: Collections-cmm.533
> Author: cmm
> Time: 7 September 2013, 12:08:00.54 pm
> UUID: f2cabfdf-d828-4a01-a4c5-3080cce8f8cb
> Ancestors: Collections-cmm.532
>
> Safer compareSafely:.
>
> =============== Diff against Collections-cmm.532 ===============
>
> Item was changed:
> ----- Method: Number>>compareSafely: (in category '*collections') -----
> compareSafely: aNumber
> + ^ aNumber isNumber and: [ self < aNumber ]!
> - "Override method to compare the receiver with aNumber to determine
> its position in a human-readable list without unnecessarily agitating
> proxies."
> - ^ self < aNumber!
>
> Item was changed:
> ----- Method: Object>>compareSafely: (in category '*collections') -----
> + compareSafely: anObject
> - compareSafely: anObject
> - "Compare the receiver to anObject to determine its position in a
> human-readable list without unnecessarily agitating proxies."
> ^ self class = anObject class
> ifTrue: [ self printString < anObject printString ]
> ifFalse: [ self class name < anObject class name ]!
>
> Item was changed:
> ----- Method: String>>compareSafely: (in category '*collections') -----
> compareSafely: aString
> + ^ aString isString and: [ self < aString ]!
> - "Compare the receiver to aString in a way that will not agitate
> proxies."
> - ^ self < aString!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130907/fe12a998/attachment.htm
More information about the Squeak-dev
mailing list
|