Skip to content

Fix dirty check for Float::NaN and BigDecimal::NaN #42831

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

Merged
merged 1 commit into from
Jul 22, 2021

Conversation

marcelolx
Copy link
Contributor

Float::NaN and BigDecimal::NaN in Ruby are special values and can't be compared with ==.

Executable test case https://gist.github.com/marcelolx/ade29cd2fac0017dec3b667555b9454d

Closes #41663

@marcelolx marcelolx force-pushed the fix_dirty_check_for_nan branch 3 times, most recently from 07a5d2f to 76b7616 Compare July 22, 2021 00:28
@marcelolx marcelolx requested a review from byroot July 22, 2021 00:28
@marcelolx marcelolx force-pushed the fix_dirty_check_for_nan branch 3 times, most recently from 568dc57 to 9dddae1 Compare July 22, 2021 12:26
@marcelolx marcelolx requested a review from byroot July 22, 2021 12:27
Float::NaN and BigDecimal::NaN in Ruby are [special values](https://bugs.ruby-lang.org/issues/1720) and can't be compared with `==`.
@marcelolx marcelolx force-pushed the fix_dirty_check_for_nan branch from 9dddae1 to d1df4c1 Compare July 22, 2021 12:49
@byroot byroot merged commit 25d8c1c into rails:main Jul 22, 2021
@byroot
Copy link
Member

byroot commented Jul 22, 2021

Thank you!

@marcelolx marcelolx deleted the fix_dirty_check_for_nan branch July 22, 2021 18:18
@marcelolx
Copy link
Contributor Author

Thank you for your review!

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

Successfully merging this pull request may close these issues.

2 participants