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

Stop including the parser source __LINE__ in exceptions #470

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

casperisfine
Copy link

It makes testing for JSON errors very tedious. You either have to use a Regexp or to regularly update all your assertions when JSON is upgraded.

--- expected
+++ actual
@@ -1 +1 @@
-"is invalid JSON: 809: unexpected token at 'FAIL'"
+"is invalid JSON: 859: unexpected token at 'FAIL'"

This is what happened to me today and prompted this PR.

cc @nurse @hsbt @tenderlove

@casperisfine
Copy link
Author

Sorry for the noise, but could this PR be considered?

It makes testing for JSON errors very tedious. You either have
to use a Regexp or to regularly update all your assertions
when JSON is upgraded.
@hsbt hsbt self-assigned this Jun 30, 2022
@hsbt hsbt merged commit 572c999 into ruby:master Jul 15, 2022
gregorbg added a commit to thewca/worldcubeassociation.org that referenced this pull request Feb 17, 2023
gregorbg added a commit to thewca/worldcubeassociation.org that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants