[#104307] Float truncate — Eustáquio Rangel <eustaquiorangel@...>
Hi!
4 messages
2021/06/16
[ruby-core:104231] [Ruby master Bug#17945] Date::Infinity comparison <=> with Float::INFINITY not symmetric
From:
brandon.j.fish@...
Date:
2021-06-10 17:35:04 UTC
List:
ruby-core #104231
Issue #17945 has been reported by bjfish (Brandon Fish). ---------------------------------------- Bug #17945: Date::Infinity comparison <=> with Float::INFINITY not symmetric https://bugs.ruby-lang.org/issues/17945 * Author: bjfish (Brandon Fish) * Status: Open * Priority: Normal * ruby -v: 3.0.0, 2.7.3 * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- **Example** ``` ruby require 'date' p Float::INFINITY <=> Date::Infinity.new p Date::Infinity.new <=> Float::INFINITY ``` **Expected Result** I expected the comparison to have the same result when the order of values is switched. ``` shell 0 0 ``` **Actual Result** ``` shell 0 1 ``` -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>