[Bug #21174] [Bug #21175] Update rubyspec

This commit is contained in:
Nobuyoshi Nakada 2025-03-07 17:52:18 +09:00
parent cbe3156f82
commit f118e0ce73
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465
Notes: git 2025-03-07 11:44:24 +00:00

View file

@ -55,11 +55,25 @@ describe "Range#max" do
(..1.0).max.should == 1.0
end
it "raises for an exclusive beginless range" do
ruby_version_is ""..."3.5" do
it "raises for an exclusive beginless Integer range" do
-> {
(...1).max
}.should raise_error(TypeError, 'cannot exclude end value with non Integer begin value')
end
end
ruby_version_is "3.5" do
it "returns the end point for exclusive beginless Integer ranges" do
(...1).max.should == 0
end
end
it "raises for an exclusive beginless non Integer range" do
-> {
(...1.0).max
}.should raise_error(TypeError, 'cannot exclude non Integer end value')
end
end
describe "Range#max given a block" do