diff --git a/language/range_spec.rb b/language/range_spec.rb index 79500c6b33..4cde7e9488 100644 --- a/language/range_spec.rb +++ b/language/range_spec.rb @@ -15,6 +15,12 @@ (1...).should == Range.new(1, nil, true) end + ruby_version_is "3.0" do + it "is frozen" do + (42..).should.frozen? + end + end + ruby_version_is "2.7" do it "creates beginless ranges" do eval("(..1)").should == Range.new(nil, 1)