Possible fix for int parsing#45
Conversation
|
Will you please rebase this off current master? |
b4fbbab to
edb2c97
Compare
|
Done. I noticed the removal of the two issue tests because of this rebase :) |
|
I just ran into an issue in |
|
Hi, it's after midnight here, I'll look at it tomorrow. However, I'll look at it tomorrow. Thanks :) |
|
@nico202 It's super minor, I don't feel strongly about getting credit. If you don't mind adding it here I have no objection |
|
Thank you for the implementation here. I would really like a second opinion from another pseudo maintainer. Can any of the watchers of this repo provide their take. Also pinging @albop |
|
bump |
|
It's always good to avoid catching errors as part of a program's normal logic and instead use them for actual exceptional situations. The best options to me seem to be:
I would vote for the first option since I find the leading zero parsing potentially confusing but that's just my preference. Note that if we don't want to parse a leading zero number as octal, there's no need for the |
|
@jdlangs thanks for your feedback. Dropping the leading 0 does not seem a good idea to me because it's in the specs: http://www.yaml.org/spec/current.html#id2503753. |
|
Ah ok, that does seem to expect it then. |
|
Another option is to modify the implicit int resolver to not match to the |
|
@nico202 Really sorry for this languishing. Is this PR still live, or has it been fixed elsewhere? |
This is still broken (I've found another number parsing issue as well, with using |
|
The title appears to be referencing issue #41, but I'm not seeing that directly linked anywhere, so doing that now. I just made some comments in issue #133 (which is linked here) to explain that how this is "fixed" should depend on which version of YAML is implemented in this package, which may not have been clearly mentioned anywhere. If it's 1.2+, I believe octals should require the letter o, e.g., 0o14. And, if that octal change is implemented here, then it might be good for the test to also include an octal. But, that depends on #133. |
Just a way to manage it, probably exists a better way.
With tests