FogBugz (Case [Issue]19746) Collection - WeakValueDictionary has counter-intuitive behavior

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FogBugz (Case [Issue]19746) Collection - WeakValueDictionary has counter-intuitive behavior

Pharo Issue Tracker
FogBugz Notification
avatar
Martin Dias opened Case 19746: WeakValueDictionary has counter-intuitive behavior and assigned it to Everyone:
Bug in Project:  Collection: 1. Pharo Image  •  You are subscribed to this case
The result of:

| dictionary |
dictionary := WeakValueDictionary with: 'hello' -> 'world' copy.
Smalltalk garbageCollect.
{
dictionary values includes: nil.
dictionary at: 'hello'.
dictionary at: 'hello' ifAbsent: [ 'absent' ].
dictionary at: 'hello' ifAbsentPut: [ 'put' ].
}

is:

#(true nil nil nil)

but we would expect:

| dictionary |
dictionary := WeakValueDictionary with: 'hello' -> 'world' copy.
Smalltalk garbageCollect.
{
dictionary values includes: nil. ---> false
dictionary at: 'hello'. ---> NotFound signal
dictionary at: 'hello' ifAbsent: [ 'absent' ]. ---> 'absent'
dictionary at: 'hello' ifAbsentPut: [ 'put' ]. ---> 'put'
}

Link: pharo-dev thread titled "WeakValueDictionary: shouldn't be "absent" after GC?"
Priority Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want FogBugz notifications anymore? Update your preferences.

FogBugz

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker