From 8065670cfbfcf89249c2de12a513b5c7308c9aeb Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 15 Jun 2021 10:39:42 -0700 Subject: [ruby/date] Fix comparison with Float::INFINITY Fixes [Bug #17945] https://github.com/ruby/date/commit/953d907238 --- ext/date/lib/date.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/date/lib') 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 -- cgit v1.2.3