akr (Akira Tanaka) wrote in #note-8: > I'm afraid the new implementation's behavior is different from Ruby's. > ... It does. Schubfach finds the shortest digits that read back as the same Float, which is what mode 0 of `dtoa` does, so ...sferik (Erik Berlin)
I've opened a pull request with a fix: https://github.com/ruby/ruby/pull/20026 It adds a `BOP_EQL` basic operator for the classes that the fast path handles and checks it instead of `BOP_EQ` when the fast path is answering for `#eql?`...sferik (Erik Berlin)
On master, methods that compare elements with `eql?` in C, such as `Array#eql?`, `Array#-` and `Array#&`, don't call a redefined `#eql?` when the receiver is an Integer, a Float, a Symbol, `nil`, `true`, `false` or a String: ```ruby ...sferik (Erik Berlin)
I've opened a pull request with a fix: https://github.com/ruby/ruby/pull/20024 It sets the x87 rounding precision to 53 bits while `strtod` from missing/dtoa.c runs, and restores it afterward. It was split out of https://github.com/ru...sferik (Erik Berlin)
On 32-bit x86 builds that use the x87 FPU for floating point, `String#to_f` sometimes returns the wrong one of two neighboring Floats when the number is very close to halfway between them. The same goes for `Float()` and `Marshal.load`, ...sferik (Erik Berlin)
I've opened a pull request with a fix: https://github.com/ruby/ruby/pull/20023 It checks the redefinition again after the block has been called for every element. It was split out of https://github.com/ruby/ruby/pull/19306 as discusse...sferik (Erik Berlin)
`Enumerable#sort_by` ignores a redefinition of `Integer#<=>` or `Float#<=>` that happens while the block is running, when every key is an Integer or every key is a Float. ```ruby redefined = false [3, 1, 2, 5, 4].sort_by do |x| u...sferik (Erik Berlin)
I've opened a pull request with a fix: https://github.com/ruby/ruby/pull/20022 It divides the Integers to a quotient a few bits wider than a double and rounds once. It was split out of https://github.com/ruby/ruby/pull/19309 as discus...sferik (Erik Berlin)
`Rational#to_f`, and `Integer#fdiv` with an Integer argument, don't always return the Float nearest to the quotient when the numerator or the denominator is too large to be exact as a double. ```ruby r = Rational(74251560964839315833...sferik (Erik Berlin)
strings (https://github.com/ruby/json/pull/1127) When a string with invalid encoding is generated in strict mode, the Java and pure-Ruby generators call as_json on it. If as_json returned a Symbol, the Symbol was turned back into the sa...sferik (Erik Berlin)