diff options
author | Jeremy Evans <[email protected]> | 2021-06-15 10:39:42 -0700 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-07-11 20:28:21 +0900 |
commit | 8065670cfbfcf89249c2de12a513b5c7308c9aeb (patch) | |
tree | a8e9044dd8879f9ec2bf91c349fac25a9a5a0e97 /ext/date | |
parent | 49ba7cd2598e047aba37c204c143ce6ee2364e8c (diff) |
[ruby/date] Fix comparison with Float::INFINITY
Fixes [Bug #17945]
https://github.com/ruby/date/commit/953d907238
Diffstat (limited to 'ext/date')
-rw-r--r-- | ext/date/lib/date.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/date/lib/date.rb b/ext/date/lib/date.rb index 65c34ace49..4901219503 100644 --- a/ext/date/lib/date.rb +++ b/ext/date/lib/date.rb @@ -30,6 +30,8 @@ class Date def <=>(other) case other when Infinity; return d <=> other.d + when Float::INFINITY; return d <=> 1 + when -Float::INFINITY; return d <=> -1 when Numeric; return d else begin |