Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Google-HTTP-Java-Client regex to be compatible with ruby #5601

Merged
merged 1 commit into from Mar 29, 2017

Conversation

@seandilda
Copy link
Contributor

commented Mar 28, 2017

All tests still pass, this should just make the regexes more portable

Adjust Google-HTTP-Java-Client regex so that it is compatible with re…
…using in ruby

All tests still pass, this should just make the regexes more portable
@Findus23

This comment has been minimized.

Copy link
Member

commented Mar 28, 2017

As I wrote that regex and am quite a beginner, I would like to ask:
What is the difference? Why is the other version not compatible with ruby?

@seandilda

This comment has been minimized.

Copy link
Contributor Author

commented Mar 28, 2017

@Findus23, since it is in a [], ruby sees the '\d-\w' as attempting a range from \d to \w (akin to doing [a-z]). It doesn't know how to process that. However, if you make the last character in the [] a -, it knows you aren't trying to create a range, but instead just want - to be one of the characters it matches.

@coveralls

This comment has been minimized.

Copy link

commented Mar 28, 2017

Coverage Status

Coverage remained the same at 98.584% when pulling 9f37fab on seandilda:google-http-java-fix into 2563ada on piwik:master.

@Findus23

This comment has been minimized.

Copy link
Member

commented Mar 28, 2017

@seandilda
Ah, that makes sense. I didn't think of that.

@sgiehl sgiehl merged commit 2864f7f into matomo-org:master Mar 29, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.