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 "Complex#finite? returns false for NaN FAILED" #4937

Closed

Conversation

yui-knk
Copy link
Contributor

@yui-knk yui-knk commented Jan 5, 2018

The behavior of Complex#finite? for NaN was fixed on
Ruby 2.5.

$ ruby -ve "p Complex(Float::NAN, Float::NAN).finite?"
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin14]
false

$ ruby -ve "p Complex(Float::NAN, Float::NAN).finite?"
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
true

Ref: https://github.com/ruby/ruby/blob/v2_5_0/complex.c#L248
https://github.com/ruby/ruby/blob/v2_5_0/numeric.c#L1731

The behavior of `Complex#finite?` for NaN was fixed on
Ruby 2.5.

```
$ ruby -ve "p Complex(Float::NAN, Float::NAN).finite?"
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin14]
false

$ ruby -ve "p Complex(Float::NAN, Float::NAN).finite?"
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
true
```

Ref: https://github.com/ruby/ruby/blob/v2_5_0/complex.c#L248
     https://github.com/ruby/ruby/blob/v2_5_0/numeric.c#L1731
@yui-knk
Copy link
Contributor Author

yui-knk commented Jan 6, 2018

This is duplicated with 825c755 . So I close this PR.

@yui-knk yui-knk closed this Jan 6, 2018
@yui-knk yui-knk deleted the ruby-2.5_fix_test_complex_finite_p branch January 6, 2018 01:21
@enebo enebo added this to the Invalid or Duplicate milestone Feb 21, 2018
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