diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-04 21:02:08 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-03-04 21:02:08 +0900 |
| commit | b176315827d1082f43628013a7d89fda02724d33 (patch) | |
| tree | 6c953c38ede5cb26e6b5a624ec9e2022ccf3d1e4 /test/ruby | |
| parent | ef5af32799b04da61bbd1bdaf464012a755c4936 (diff) | |
[Bug #20324] Uncomparable ranges are not overlapping
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_range.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_range.rb b/test/ruby/test_range.rb index fe14bb9b3b..2aa69dc6a4 100644 --- a/test/ruby/test_range.rb +++ b/test/ruby/test_range.rb @@ -1265,6 +1265,8 @@ class TestRange < Test::Unit::TestCase assert_operator(0.., :overlap?, 1..) assert_not_operator((1..3), :overlap?, ('a'..'d')) + assert_not_operator((1..), :overlap?, ('a'..)) + assert_not_operator((..1), :overlap?, (..'a')) assert_raise(TypeError) { (0..).overlap?(1) } assert_raise(TypeError) { (0..).overlap?(nil) } |
