MappedCollection >> #keysDo: does not work as expected
By Sam Phillips - Posted on July 1st, 2008
| Project: | GNU Smalltalk |
| Component: | Base classes |
| Category: | bug |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | fixed |
Description
I'm uncertain if this is the proper behavior for this or not, but when
you perform #keysDo: on a MappedCollection you get the mapped key values
which are different from the response from #keys.
Example:
st> d := Dictionary from: { #aaa -> 1. #bbb -> 2. #ccc -> 4}
Dictionary (
#aaa->1
#bbb->2
#ccc->4
)
st> m := MappedCollection collection: (Array new: 4) map: d
MappedCollection (nil nil nil )
st> m keys
Set (#aaa #bbb #ccc )
st> m keysDo: [:k | k displayNl ]
1
2
4
MappedCollection (nil nil nil )
Updates
#1 submitted by Paolo Bonzini on Thu, 07/10/2008 - 14:42
fixed in 8f27a7f, thanks. MappedCollection >> #keysDo: should send #keysDo: (not #do:) to the map.
#2 submitted by Paolo Bonzini on Thu, 07/10/2008 - 14:42
| Status: | active | » fixed |
fixed in 8f27a7f, thanks. MappedCollection >> #keysDo: should send #keysDo: (not #do:) to the map.
