I think I've found a bug in String class>>readFrom:. This sentence fails:
z := String readFrom: 'Good morning' readStream. I think that the bug is on the first line, saying: ^ self class streamContents:. The 'class' message shouldn't be here, because 'self' itself refers to the String class.
Present in Pharo 2.0 and 3.0. Thanks a lot. |
On 14 Jun 2013, at 11:44, José Comesaña <[hidden email]> wrote: > I think I've found a bug in String class>>readFrom:. This sentence fails: > > z := String readFrom: 'Good morning' readStream. > > I think that the bug is on the first line, saying: ^ self class streamContents:. The 'class' message shouldn't be here, because 'self' itself refers to the String class. > > Present in Pharo 2.0 and 3.0. > > Thanks a lot. Yes, José, that is a bug and your solution is correct. That also means that this code path is not covered by any tests. Could you make an issue and make a slice (adding a test) ? Sven -- Sven Van Caekenberghe Proudly supporting Pharo http://pharo.org http://association.pharo.org http://consortium.pharo.org |
OK, but I don't know how to make an issue, sorry. :(
2013/6/14 Sven Van Caekenberghe <[hidden email]>
|
No problem, here is the issue
https://pharo.fogbugz.com/f/cases/10915/String-class-readFrom-is-broken-and-untested I will produce a slice later on. On 14 Jun 2013, at 11:58, José Comesaña <[hidden email]> wrote: > OK, but I don't know how to make an issue, sorry. :( > > > 2013/6/14 Sven Van Caekenberghe <[hidden email]> > > On 14 Jun 2013, at 11:44, José Comesaña <[hidden email]> wrote: > > > I think I've found a bug in String class>>readFrom:. This sentence fails: > > > > z := String readFrom: 'Good morning' readStream. > > > > I think that the bug is on the first line, saying: ^ self class streamContents:. The 'class' message shouldn't be here, because 'self' itself refers to the String class. > > > > Present in Pharo 2.0 and 3.0. > > > > Thanks a lot. > > Yes, José, that is a bug and your solution is correct. > > That also means that this code path is not covered by any tests. > > Could you make an issue and make a slice (adding a test) ? > > Sven > > -- > Sven Van Caekenberghe > Proudly supporting Pharo > http://pharo.org > http://association.pharo.org > http://consortium.pharo.org > > > > > > |
Fix and test sent.
Regards.
2013/6/14 Sven Van Caekenberghe <[hidden email]> No problem, here is the issue |
On 14 Jun 2013, at 13:52, José Comesaña <[hidden email]> wrote: > Fix and test sent. Where ? Anyway, I already did it ;-) > Regards. > > 2013/6/14 Sven Van Caekenberghe <[hidden email]> > No problem, here is the issue > > https://pharo.fogbugz.com/f/cases/10915/String-class-readFrom-is-broken-and-untested > > I will produce a slice later on. === In 3.0 inbox: Name: SLICE-Issue-10915-String-classreadFrom-is-broken-and-untested-SvenVanCaekenberghe.1 Author: SvenVanCaekenberghe Time: 14 June 2013, 1:48:49.050736 pm UUID: f9146100-8d5a-42f4-af95-e00accbd2bdc Ancestors: Dependencies: Collections-Strings-SvenVanCaekenberghe.263, CollectionsTests-SvenVanCaekenberghe.604 Fix String class>>#readFrom: and add a test (thx José Comesaña) === > On 14 Jun 2013, at 11:58, José Comesaña <[hidden email]> wrote: > > > OK, but I don't know how to make an issue, sorry. :( > > > > > > 2013/6/14 Sven Van Caekenberghe <[hidden email]> > > > > On 14 Jun 2013, at 11:44, José Comesaña <[hidden email]> wrote: > > > > > I think I've found a bug in String class>>readFrom:. This sentence fails: > > > > > > z := String readFrom: 'Good morning' readStream. > > > > > > I think that the bug is on the first line, saying: ^ self class streamContents:. The 'class' message shouldn't be here, because 'self' itself refers to the String class. > > > > > > Present in Pharo 2.0 and 3.0. > > > > > > Thanks a lot. > > > > Yes, José, that is a bug and your solution is correct. > > > > That also means that this code path is not covered by any tests. > > > > Could you make an issue and make a slice (adding a test) ? > > > > Sven > > > > -- > > Sven Van Caekenberghe > > Proudly supporting Pharo > > http://pharo.org > > http://association.pharo.org > > http://consortium.pharo.org > > > > > > > > > > > > > > > |
Free forum by Nabble | Edit this page |