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
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:

     "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 [-]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.


Pharo-bugtracker mailing list
[hidden email]