summaryrefslogtreecommitdiff
path: root/spec/ruby
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2023-07-17 16:07:39 +0900
committernagachika <nagachika@ruby-lang.org>2023-07-17 16:07:39 +0900
commit5328c58c7d00540f4f56749aaeefb68761bd7eba (patch)
tree4f1d555b1327d198166f0832f4b552d087fb0128 /spec/ruby
parent8165db0f4666f90fe0df5cdd466f73c6de1f6cea (diff)
merge revision(s) 1a149aab776aa6741628eb35482eff1ded197fd2,fb17c833f542222afdf482924877d43aa577782d,60f22ebf86248388b41b4ec751d16700f2b4b621: [Backport #19533]
Extract range type check functions --- range.c | 55 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 19 deletions(-) [Bug #19533] Fix infinite range inclusion with numeric value --- range.c | 10 +++++++--- test/ruby/test_range.rb | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) [Bug #19533] Add spec of infinite range inclusion --- spec/ruby/core/range/case_compare_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+)
Diffstat (limited to 'spec/ruby')
-rw-r--r--spec/ruby/core/range/case_compare_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/range/case_compare_spec.rb b/spec/ruby/core/range/case_compare_spec.rb
index 4a3faa3163..65878aaabe 100644
--- a/spec/ruby/core/range/case_compare_spec.rb
+++ b/spec/ruby/core/range/case_compare_spec.rb
@@ -10,4 +10,10 @@ describe "Range#===" do
it_behaves_like :range_cover_and_include, :===
it_behaves_like :range_cover, :===
+
+ ruby_bug "#19533", "3.2"..."3.3" do
+ it "returns true on any value if begin and end are both nil" do
+ (nil..nil).should === 1
+ end
+ end
end