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

When 'allow_bignum' is enabled, floats and big integers inside structures are not properly decoded #76

Merged
merged 1 commit into from
Nov 16, 2016

Conversation

GilmarSantosJr
Copy link
Contributor

When trying to decode JSON strings that contain floats inside structures, with 'allow_bignum' enabled, I got warnings about syntax errors in eval.

As far as I understood, the code to create the Math::Big(Int|Float) objects in decode took all the JSON string from the beginning of the number to the end of JSON string (instead of just to the end of the number).

Added a couple of tests to illustrate the issue.

Thank you rurban for this great module!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 61.29% when pulling 6c20c81 on GilmarSantosJr:master into 0882552 on rurban:master.

Copy link
Owner

@rurban rurban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, didn't think about that

@rurban rurban merged commit 6c20c81 into rurban:master Nov 16, 2016
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