| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
RubyBignum overrode eql_p to delegate to op_equal (==), which accepts Floats and Rationals. In Ruby, eql? must be type-strict: (2**100).eql?((2**100).to_f) should return false. Remove the override so the parent RubyNumeric.eql_p handles it correctly with a getClass() check before value comparison.
There was a problem hiding this comment.
Consider moving specs to ruby/spec.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
RubyBignum overrode eql_p to delegate to op_equal (==), which accepts Floats and Rationals. In Ruby, eql? must be type-strict: (2**100).eql?((2**100).to_f) should return false.
Remove the override so the parent RubyNumeric.eql_p handles it correctly with a getClass() check before value comparison.