Project

General

Profile

Actions

Feature #17825

open

Uniformize Float::INFINITY and Date::infinity.new

Added by Aoernis (lucas billaudot) about 3 years ago. Updated almost 3 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:103587]

Description

With Float you can do

Float::INFINITY # Infinity

and with Date you can do

Date::Infinity.new # #<Date::Infinity:0x00007f8d46a59ee0 @d=1>

but not

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

Actions

Also available in: Atom PDF

Like0
Like0