Project

General

Profile

Bug #6677

Bignum#== and Float#== should be symmetric

Added by Benoit Daloze almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
ruby -v:
ruby 2.0.0dev (2012-05-25 trunk 35779) [x86_64-darwin10.8.0]
[ruby-core:45988]

Description

Reading #3429 again, I noticed a related bug (and by the way, thank you nobu for solving that bug!):

I wrote:
"Also, while doing some tests about this I noticed that "bignum == Float::INFINITY" [...], while it should not, as it is always false."

I did not notice it to hang anymore, but the result of #== is asymmetrical:

irb for ruby 2.0.0 r35779
> n=2**7830457;nil
=> nil
> n == Float::INFINITY
=> false
> Float::INFINITY == n
=> true

I think a Bignum is never infinite.

History

#1 [ruby-core:46048] Updated by Kenta Murata almost 4 years ago

  • Assignee set to Kenta Murata

#2 [ruby-core:46470] Updated by Yusuke Endoh almost 4 years ago

  • Status changed from Open to Assigned

#3 [ruby-core:51659] Updated by Marc-Andre Lafortune over 3 years ago

  • Status changed from Assigned to Closed

Fixed as of r38825.

Also available in: Atom PDF