From: nobu@... Date: 2021-05-04T01:43:14+00:00 Subject: [ruby-core:103706] [Ruby master Feature#17825] Uniformize Float::INFINITY and Date::infinity.new Issue #17825 has been updated by nobu (Nobuyoshi Nakada). Description updated It's hard to remove that class because of marshal compatibility. ```diff diff --git a/ext/date/lib/date.rb b/ext/date/lib/date.rb index 65c34ace492..e96d102d7da 100644 --- a/ext/date/lib/date.rb +++ b/ext/date/lib/date.rb @@ -9,6 +9,8 @@ false end + INFINITY = Float::INFINITY # :nodoc: + class Infinity < Numeric # :nodoc: def initialize(d=1) @d = d <=> 0 end @@ -60,4 +62,5 @@ end + deprecate_constant :Infinity end ``` ---------------------------------------- Feature #17825: Uniformize Float::INFINITY and Date::infinity.new https://bugs.ruby-lang.org/issues/17825#change-91799 * Author: Aoernis (lucas billaudot) * Status: Open * Priority: Normal ---------------------------------------- With `Float` you can do ``` ruby Float::INFINITY # Infinity ``` and with `Date` you can do ``` ruby Date::Infinity.new # # ``` but not ``` ruby Date::INFINITY # uninitialized constant Date::INFINITY ``` #### Background `Date::Infinity.new` and `Float::INFINITY` have both the same ancestors and have same using purpose So it feel odd no be able to call them the same way #### Proposal Just make `Date::INFINITY` a working thing And maybe mark `Date::Infinity.new` as deprecated ��\_(���)_/�� Thanks for reading -- https://bugs.ruby-lang.org/ Unsubscribe: