<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Chris --<div><br></div><div>Thanks for improving this. I must have overlooked that PluggableDictionary implementation. Sorry. :-)</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 02.02.2022 22:54:33 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Chris Muller uploaded a new version of Collections to project The Trunk:<br>http://source.squeak.org/trunk/Collections-cmm.984.mcz<br><br>==================== Summary ====================<br><br>Name: Collections-cmm.984<br>Author: cmm<br>Time: 2 February 2022, 3:54:20.944662 pm<br>UUID: 88a7a4ca-9648-4dce-bb89-f9c857baec29<br>Ancestors: Collections-mt.983<br><br>- Avoid unnecessary garbage in #= for OrderedDictionary comparisons.<br>- Delegate #species comparison via #=.<br>- #hasEqualElements: API compatibility with SequenceableCollection.<br><br>=============== Diff against Collections-mt.983 ===============<br><br>Item was added:<br>+ ----- Method: OrderedDictionary>>hasEqualElements: (in category 'comparing') -----<br>+ hasEqualElements: anOrderedDictionary<br>+ "Answer whether my elements are the same as anOrderedDictionary, and in the same order."<br>+ | index |<br>+ self size = anOrderedDictionary size ifFalse: [ ^ false ].<br>+ index := 0.<br>+ self associationsDo:<br>+ [ : eachMyAssociation |<br>+ (anOrderedDictionary<br>+ atIndex: (index:=index+1)<br>+ ifAbsent: [ ^ false ]) = eachMyAssociation ifFalse: [ ^ false ] ].<br>+ ^ true!<br><br>Item was changed:<br> ----- Method: PluggableDictionary>>= (in category 'comparing') -----<br> = anObject<br> "Two dictionaries are equal if<br> (a) they are the same 'kind' of thing.<br> (b) they have the same set of keys.<br> (c) for each (common) key, they have the same value"<br> <br> self == anObject ifTrue: [ ^true ].<br>+ self species = anObject species ifFalse: [ ^false ].<br>- self species == anObject species ifFalse: [ ^false ].<br> hashBlock = anObject hashBlock ifFalse: [ ^false ].<br> equalBlock = anObject equalBlock ifFalse: [ ^false ].<br>+ ^ self hasEqualElements: anObject!<br>- self size = anObject size ifFalse: [ ^false ].<br>- self associationsDo: [ :association |<br>- (anObject at: association key ifAbsent: [ ^false ]) = association value<br>- ifFalse: [ ^false ] ].<br>- ^true!<br><br>Item was added:<br>+ ----- Method: PluggableDictionary>>hasEqualElements: (in category 'comparing') -----<br>+ hasEqualElements: aDictionary<br>+ "Answer whether my elements are the same as those of aDictionary."<br>+ self size = aDictionary size ifFalse: [ ^ false ].<br>+ self associationsDo:<br>+ [ : association |<br>+ (aDictionary<br>+ at: association key<br>+ ifAbsent: [ ^ false ]) = association value ifFalse: [ ^ false ] ].<br>+ ^ true!<br><br><br></div></blockquote></div>