Yes, I understand the paradigm, nil is nothing is zero, empty is
nothing is zero...
But frankly, do you think '' forms a valid Number ? In every context ?
So yes, this is expected, and can break compatibility, but sometimes
this is necessary.

If you want to keep this behaviour, you have to use an explicit rule like:
asNumberOrZero
   ^Number readFrom: self ifFail: [^0]

Hope this helps...

Nicolas

2009/10/20 Mariano Martinez Peck <[email protected]>:
> Hi folks:  In older images, like 10418, '' asNumber  gave me a 0 (zero). But
> now, I get a 'Reading a number failed'.
>
> Is this expected?
>
> Perhaps it is due to the fix to this bug:
>
> http://code.google.com/p/pharo/issues/detail?can=1&q=1258&colspec=ID%20Type%20Status%20Summary%20Milestone&id=1258
>
> any toughs?
>
> best
>
> Mariano
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to