Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to refer Float::NAN and Float::INFINITY
Currently, ruby-pg returns evaluated value of `0.0/0.0` when a query search result contains NaN, instead of `Float:: NAN`. This behavior is strange and not intuitive, especially when user checks values in query by `val.equal?(Float::NAN)` (faster) instead of `val.is_a?(Float) && val.nan?` (slower). This commit fixes it to return `Float::NAN`. Similarly, fix to use `Float::INFINITY` instead of `1.0/0.0`.
- Loading branch information