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

Ensure floats are correctly coerced to bigdecimal #2033

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

tlconnor
Copy link
Contributor

Possible fix for Float coercion to BigDecimal #2032.

When checking for equality of params, checks both the class and value of params rather than just the value.

/cc: @dblock @dnesteryuk

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Looks like there are legit failures depending on Rails version.

CHANGELOG.md Outdated
@@ -10,6 +10,7 @@
#### Fixes

* Your contribution here.
* [#2033](https://github.com/ruby-grape/grape/pull/2033): Ensure floats are correctly coerced to bigdecimal - [@tlconnor](https://github.com/tlconnor).
Copy link
Member

Choose a reason for hiding this comment

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

quote and spell Float and BigDecimal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@dblock dblock merged commit a56fb88 into ruby-grape:master Apr 1, 2020
@dblock
Copy link
Member

dblock commented Apr 1, 2020

👍

@tlconnor tlconnor deleted the fixBigDecimalCoercion branch April 1, 2020 05:13
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.

None yet

2 participants