Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -4142,14 +4142,7 @@ pm_double_parse(pm_parser_t *parser, const pm_token_t *token) {

// If errno is set, then it should only be ERANGE. At this point we need to
// check if it's infinity (it should be).
if (
errno == ERANGE &&
#ifdef _WIN32
!_finite(value)
#else
isinf(value)
#endif
) {
if (errno == ERANGE && isinf(value)) {
int warn_width;
const char *ellipsis;

Expand Down
8 changes: 1 addition & 7 deletions src/static_literals.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,13 +501,7 @@ pm_static_literal_inspect_node(pm_buffer_t *buffer, const pm_static_literals_met
case PM_FLOAT_NODE: {
const double value = ((const pm_float_node_t *) node)->value;

if (
#ifdef _WIN32
!_finite(value)
#else
isinf(value)
#endif
) {
if (isinf(value)) {
if (*node->location.start == '-') {
pm_buffer_append_byte(buffer, '-');
}
Expand Down
Loading