[squeak-dev] Color fromString: broken

Levente Uzonyi leves at elte.hu
Wed Dec 8 23:36:03 UTC 2010


On Wed, 8 Dec 2010, Bert Freudenberg wrote:

> Test case:
>
> 	Color fromString: 'yellow'
>
> used to return yellow. Now it returns a very dark gray.
>
> The culprit is in #asNumber:
>
> 	'16rYE' asNumber
>
> used to raise an error. Now it silently returns 16.

It returns 0 since Squeak 3.9. Relying on such an error is bad idea and 
fixing this method is easy. Though it may have been hard to track the 
problem down.
I wonder why is ColorNames an OrderedCollection instead of an IdentitySet.


Levente

>
> I can't imagine why this would be desirable?
>
> - Bert -
>
>
>
>



More information about the Squeak-dev mailing list