Manuscript (Case [Issue]22144) Kernel - Wrong comment in String>>#asDuration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Manuscript (Case [Issue]22144) Kernel - Wrong comment in String>>#asDuration

Pharo Issue Tracker
Manuscript Notification
avatar
Julien Delplanque opened Case 22144: Wrong comment in String>>#asDuration and assigned it to Everyone:
Bug in Project:  Kernel: 1. Pharo Image  •  You are subscribed to this case
The comment in String>>#asDuration is wrong:

asDuration
     "convert from [nnnd]hh:mm:ss[.nanos] format. [] implies optional elements"
 
     ^ Duration fromString: self
 

Indeed, if you look at: Duration class >> #fromString:

fromString: aString

    ^ self readFrom: aString readStream

And then at: Duration class >> #readFrom:

readFrom: aStream
    "Formatted as per ANSI 5.8.2.16: [-]D:HH:MM:SS[.S]"[...]

 

The documentations about the format of the String to be parsed do not match.

The correct documentation is in the comment of Duration class >> #readFrom:
Priority Priority: 5 – Fix If Time Status Status: Work Needed
Assigned To Assigned to: Everyone Milestone Milestone: Later

Go to Case
No longer need updates? Unsubscribe from this case.

Don't want Manuscript notifications anymore? Update your preferences.

Manuscript

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
https://lists.gforge.inria.fr/mailman/listinfo/pharo-bugtracker