[Glass] Exception converting aString to Time

Dale Henrichs dale.henrichs at gemtalksystems.com
Mon May 6 12:27:35 PDT 2019


As I suspected, there is the potential for breaking existing code as 
Pharo3.0 only produced an error for `~~~`:

{
     Time fromString: '01256asd'.
     Time fromString: '0125asd'.
     Time fromString: '~~~'.
     Time fromString: '112'.
     Time fromString: '1100'
}

    Pharo 3.0:                                  an Array(8:00 am 5:00 am ERROR 4:00 pm 8:00 pm)

I made proposed changes to GemStone (Time class>>readFrom:) where the 
code produces errors for the first three cases:

    GemStone 3.4.3 (with my proposed patch):    anArray( ERROR, ERROR, ERROR 16:00:00, 20:00:00)

I think that it is reasonble to fail in the first three cases, but I am 
concerned that existing code may depend upon the first two cases running 
without error and perhaps even the third case ... I would like to hear 
opinions from a few more folks before pushing my changes to master ...

Dale

On 5/5/19 10:53 AM, BrunoBB via Glass wrote:
> Hi,
>
> There are more "strange" results in Time>>fromString: method. On GS 3.4.1
> this method belong to Monticello package.
>
> Time fromString: '01256asd'. "08:00:00"
> Time fromString: '0125asd'. "05:00:00"
> Time fromString: '~~~'. "00:00:00"
> Time fromString: '112'.  "16:00:00"
> Time fromString: '1100'. "20:00:00"
>
> regards,
> bruno
>
>
>
> --
> Sent from: http://forum.world.st/GLASS-f1460844.html
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20190506/003dc23d/attachment.html>


More information about the Glass mailing list