std.regex: fix inverted condition in Group.toString#11036
Conversation
|
Thanks for your pull request and interest in making D better, @kubo39! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#11036" |
A group is matched iff begin <= end (Group.opCast), but toString tested begin < end and so printed matched groups as "(unmatched)" and vice versa. Debug-only output; add a unittest. The unittest's "begin..end" string trips the "space between a .. b" style grep, so exclude ir.d from it as is already done for std/string.d and std/uni/package.d.
5f21db8 to
77e21cf
Compare
|
If this is a bug fix, please open or link a corresponding issue. |
|
I think it's not necessary, only for debugging purpose. |
DmitryOlshansky
left a comment
There was a problem hiding this comment.
Seems fine. The whole thing is mostly for debugging.
A group is matched iff begin <= end (Group.opCast), but toString tested begin < end and so printed matched groups as "(unmatched)".