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

FIX: fix double validation #314

Merged
merged 1 commit into from
Aug 21, 2024
Merged

FIX: fix double validation #314

merged 1 commit into from
Aug 21, 2024

Conversation

Lhcfl
Copy link
Contributor

@Lhcfl Lhcfl commented Aug 21, 2024

The old float validation had several bugs. It will recognize strings like "a1.2" and "3.4b" as valid doubles, but will not recognize integers like "1234" as doubles. Also, since an empty string is not falsy in Ruby, it will recognize "Inf" as -Infinity.

This commit fixes these bugs

The old float validation had several bugs. It will recognize strings
like "a1.2" and "3.4b" as valid doubles, but will not recognize integers
like "1234" as doubles. Also, since an empty string is not falsy in Ruby,
it will recognize "Inf" as -Infinity.

This commit fixes these issues
@Lhcfl Lhcfl merged commit 1d991c6 into main Aug 21, 2024
5 checks passed
@Lhcfl Lhcfl deleted the fix-double-validation branch August 21, 2024 07:39
@Lhcfl
Copy link
Contributor Author

Lhcfl commented Aug 21, 2024

Thanks for review @martin-brennan !

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

Successfully merging this pull request may close these issues.

2 participants