[squeak-dev] Dictionary>>collect: returning OrderedCollection?
Bert Freudenberg
bert at freudenbergs.de
Thu Jun 12 21:28:51 UTC 2008
On 12.06.2008, at 23:21, Andreas Raab wrote:
> Hi -
>
> Just got bitten by the fact that Dictionary>>collect: returns an
> OrderedCollection instead of a Dictionary. What I had expected was
> e.g.,
>
> dict := Dictionary newFromPairs:{
> #first. 1.
> #second. 2.
> #third. 3.
> }.
> dict collect:[:item| item asWords].
>
> => a Dictionary(#first->'one' #second->'two' #third->'three' )
>
> but instead the result is an OrderedCollection('one' 'two' 'three').
> Does anyone besides me consider this a bug? What does ANSI say about
> this issue?
Don't know about ANSI, but I'd have expected a Dictionary, too.
- Bert -
More information about the Squeak-dev
mailing list
|