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

Use \A and \z to match beginning and end of string #67

merged 1 commit into from Jul 22, 2016


Copy link

@rgould rgould commented Jul 22, 2016

Found a strange and awkward bug that would cause the regex /^\d+$/ to match if anywhere in the response was a string such as \n12345\n. It would then try and parse the entire response (an XML doc) into Integer(). If we use \A and \z instead, it'll check the beginning and ends of the string, rather than search for the beginning and ends of a line.

@visoft visoft merged commit 897eeb7 into visoft:master Jul 22, 2016
Copy link

visoft commented Jul 22, 2016

Thanks for finding this weird bug. The Travis CI build is failing because of the Ruby versions I'm testing as a gem only supports > 2.2.3. I need to change those to get it to pass. Again, thanks for your contribution!

Copy link
Contributor Author

rgould commented Jul 22, 2016

np! thanks for the gem. as you can see we're getting very good use out of it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants