Project

General

Profile

Feature #17825

Updated by nobu (Nobuyoshi Nakada) over 3 years ago

**Description** 

 With `Float` you can do  
 ``` ruby 
 Float::INFINITY # Infinity 
 ``` 
 and with `Date` you can do  
 ``` ruby 
 Date::Infinity.new # #<Date::Infinity:0x00007f8d46a59ee0 @d=1> 
 ``` 
 but not  
 ``` ruby 
 Date::INFINITY # uninitialized constant Date::INFINITY 
 ``` 

 #### Background **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 **Proposal** 

 Just make `Date::INFINITY` a working thing 
 And maybe mark `Date::Infinity.new` as deprecated ¯\_(ツ)_/¯ 

 Thanks for reading 

Back