Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.669.mcz
==================== Summary ====================
Name: Collections-ul.669
Author: ul
Time: 2 November 2015, 2:00:09.732 am
UUID: 01e30af9-3dd4-4b5e-ab40-89ce43884565
Ancestors: Collections-ul.668
Changed Set >> #= and Dictionary >> #= to check the species of the receiver and the argument.
PluggableDictionary and PluggableSet also check hashBlock and equalBlock.
WeakSet and friends will work once we start using ephemerons.
=============== Diff against Collections-ul.668 ===============
Item was changed:
----- Method: Dictionary>>= (in category 'comparing') -----
= anObject
"Two dictionaries are equal if
(a) they are the same 'kind' of thing.
(b) they have the same set of keys.
(c) for each (common) key, they have the same value"
self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
- anObject isDictionary ifFalse: [ ^false ].
self size = anObject size ifFalse: [ ^false ].
self associationsDo: [ :association |
(anObject at: association key ifAbsent: [ ^false ]) = association value
ifFalse: [ ^false ] ].
- "The two dictionaries may have different ideas about equal keys, so check both ways to avoid any inconsistency."
- anObject associationsDo: [ :association |
- (self at: association key ifAbsent: [ ^false ]) = association value
- ifFalse: [ ^false ] ].
^true!
Item was added:
+ ----- Method: PluggableDictionary>>= (in category 'comparing') -----
+ = anObject
+ "Two dictionaries are equal if
+ (a) they are the same 'kind' of thing.
+ (b) they have the same set of keys.
+ (c) for each (common) key, they have the same value"
+
+ self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
+ hashBlock = anObject hashBlock ifFalse: [ ^false ].
+ equalBlock = anObject equalBlock ifFalse: [ ^false ].
+ self size = anObject size ifFalse: [ ^false ].
+ self associationsDo: [ :association |
+ (anObject at: association key ifAbsent: [ ^false ]) = association value
+ ifFalse: [ ^false ] ].
+ ^true!
Item was added:
+ ----- Method: PluggableSet>>= (in category 'as yet unclassified') -----
+ = anObject
+ "Two sets are equal if
+ (a) they are the same 'kind' of thing.
+ (b) they have the same set of keys.
+ (c) for each (common) key, they have the same value"
+
+ self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
+ hashBlock = anObject hashBlock ifFalse: [ ^false ].
+ equalBlock = anObject equalBlock ifFalse: [ ^false ].
+ self size = anObject size ifFalse: [ ^false ].
+ ^self allSatisfy: [ :each | anObject includes: each ]!
Item was changed:
----- Method: Set>>= (in category 'comparing') -----
+ = anObject
+ "Two sets are equal if
+ (a) they are the same 'kind' of thing.
+ (b) they have the same set of keys.
+ (c) for each (common) key, they have the same value"
+
+ self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
+ self size = anObject size ifFalse: [ ^false ].
+ ^self allSatisfy: [ :each | anObject includes: each ]!
- = aSet
- self == aSet ifTrue: [^ true]. "stop recursion"
- (aSet isKindOf: Set) ifFalse: [^ false].
- self size = aSet size ifFalse: [^ false].
- self do: [:each | (aSet includes: each) ifFalse: [^ false]].
- ^ true!
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.669.mcz
==================== Summary ====================
Name: Collections-ul.669
Author: ul
Time: 2 November 2015, 2:00:09.732 am
UUID: 01e30af9-3dd4-4b5e-ab40-89ce43884565
Ancestors: Collections-ul.668
Changed Set >> #= and Dictionary >> #= to check the species of the receiver and the argument.
PluggableDictionary and PluggableSet also check hashBlock and equalBlock.
WeakSet and friends will work once we start using ephemerons.
=============== Diff against Collections-ul.668 ===============
Item was changed:
----- Method: Dictionary>>= (in category 'comparing') -----
= anObject
"Two dictionaries are equal if
(a) they are the same 'kind' of thing.
(b) they have the same set of keys.
(c) for each (common) key, they have the same value"
self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
- anObject isDictionary ifFalse: [ ^false ].
self size = anObject size ifFalse: [ ^false ].
self associationsDo: [ :association |
(anObject at: association key ifAbsent: [ ^false ]) = association value
ifFalse: [ ^false ] ].
- "The two dictionaries may have different ideas about equal keys, so check both ways to avoid any inconsistency."
- anObject associationsDo: [ :association |
- (self at: association key ifAbsent: [ ^false ]) = association value
- ifFalse: [ ^false ] ].
^true!
Item was added:
+ ----- Method: PluggableDictionary>>= (in category 'comparing') -----
+ = anObject
+ "Two dictionaries are equal if
+ (a) they are the same 'kind' of thing.
+ (b) they have the same set of keys.
+ (c) for each (common) key, they have the same value"
+
+ self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
+ hashBlock = anObject hashBlock ifFalse: [ ^false ].
+ equalBlock = anObject equalBlock ifFalse: [ ^false ].
+ self size = anObject size ifFalse: [ ^false ].
+ self associationsDo: [ :association |
+ (anObject at: association key ifAbsent: [ ^false ]) = association value
+ ifFalse: [ ^false ] ].
+ ^true!
Item was added:
+ ----- Method: PluggableSet>>= (in category 'as yet unclassified') -----
+ = anObject
+ "Two sets are equal if
+ (a) they are the same 'kind' of thing.
+ (b) they have the same set of keys.
+ (c) for each (common) key, they have the same value"
+
+ self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
+ hashBlock = anObject hashBlock ifFalse: [ ^false ].
+ equalBlock = anObject equalBlock ifFalse: [ ^false ].
+ self size = anObject size ifFalse: [ ^false ].
+ ^self allSatisfy: [ :each | anObject includes: each ]!
Item was changed:
----- Method: Set>>= (in category 'comparing') -----
+ = anObject
+ "Two sets are equal if
+ (a) they are the same 'kind' of thing.
+ (b) they have the same set of keys.
+ (c) for each (common) key, they have the same value"
+
+ self == anObject ifTrue: [ ^true ].
+ self species == anObject species ifFalse: [ ^false ].
+ self size = anObject size ifFalse: [ ^false ].
+ ^self allSatisfy: [ :each | anObject includes: each ]!
- = aSet
- self == aSet ifTrue: [^ true]. "stop recursion"
- (aSet isKindOf: Set) ifFalse: [^ false].
- self size = aSet size ifFalse: [^ false].
- self do: [:each | (aSet includes: each) ifFalse: [^ false]].
- ^ true!
Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.167.mcz
==================== Summary ====================
Name: Network-ul.167
Author: ul
Time: 2 November 2015, 2:02:21.822 am
UUID: cc1e8b01-d960-40ff-b466-54e7bcb73cb7
Ancestors: Network-topa.166
Now that #primMakeUUID is not being used anymore, we can change its behaviour to return nil when the plugin is not available.
Added accessors for UUID variant and version.
=============== Diff against Network-topa.166 ===============
Item was changed:
----- Method: UUID>>primMakeUUID (in category 'system primitives') -----
primMakeUUID
+
<primitive: 'primitiveMakeUUID' module: 'UUIDPlugin'>
+ ^nil!
- self makeUUID!
Item was added:
+ ----- Method: UUID>>variant (in category 'accessing') -----
+ variant
+
+ ^(self at: 9) bitShift: -6!
Item was added:
+ ----- Method: UUID>>version (in category 'accessing') -----
+ version
+
+ ^(self at: 7) bitShift: -4!
Levente Uzonyi uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-ul.167.mcz
==================== Summary ====================
Name: Network-ul.167
Author: ul
Time: 2 November 2015, 2:02:21.822 am
UUID: cc1e8b01-d960-40ff-b466-54e7bcb73cb7
Ancestors: Network-topa.166
Now that #primMakeUUID is not being used anymore, we can change its behaviour to return nil when the plugin is not available.
Added accessors for UUID variant and version.
=============== Diff against Network-topa.166 ===============
Item was changed:
----- Method: UUID>>primMakeUUID (in category 'system primitives') -----
primMakeUUID
+
<primitive: 'primitiveMakeUUID' module: 'UUIDPlugin'>
+ ^nil!
- self makeUUID!
Item was added:
+ ----- Method: UUID>>variant (in category 'accessing') -----
+ variant
+
+ ^(self at: 9) bitShift: -6!
Item was added:
+ ----- Method: UUID>>version (in category 'accessing') -----
+ version
+
+ ^(self at: 7) bitShift: -4!