From 24493779b79bb57fd2e71bf6e0ababe95448a9d6 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 13 Sep 2024 10:50:38 +0900 Subject: [Bug #20725] Should not call compare on `nil`-endpoint It means unbounded, always inclusive of other ranges. --- test/ruby/test_range.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby') diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index 842be77ab3..e0c1d20bd2 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -1471,6 +1471,7 @@ class TestRange < Test::Unit::TestCase assert_operator((..3), :overlap?, (3..)) assert_operator((nil..nil), :overlap?, (3..)) assert_operator((nil...nil), :overlap?, (nil..)) + assert_operator((nil..nil), :overlap?, (..3)) assert_raise(TypeError) { (1..3).overlap?(1) } -- cgit v1.2.3