Set 1.1 now checks subclass-ness stricter

This commit is contained in:
Nobuyoshi Nakada 2023-12-23 18:15:26 +09:00
Родитель f6e9899e8a
Коммит dc7785e16b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
3 изменённых файлов: 15 добавлений и 9 удалений

Просмотреть файл

@ -45,9 +45,11 @@ describe "Set#flatten!" do
-> { set.flatten! }.should raise_error(ArgumentError)
end
context "when Set contains a Set-like object" do
it "flattens self, including Set-like objects" do
Set[SetSpecs::SetLike.new([1])].flatten!.should == Set[1]
version_is(Set::VERSION, ""..."1.1.0") do
context "when Set contains a Set-like object" do
it "flattens self, including Set-like objects" do
Set[SetSpecs::SetLike.new([1])].flatten!.should == Set[1]
end
end
end
end

Просмотреть файл

@ -33,9 +33,11 @@ describe "Set#proper_subset?" do
-> { Set[].proper_subset?(Object.new) }.should raise_error(ArgumentError)
end
context "when comparing to a Set-like object" do
it "returns true if passed a Set-like object that self is a proper subset of" do
Set[1, 2, 3].proper_subset?(SetSpecs::SetLike.new([1, 2, 3, 4])).should be_true
version_is(Set::VERSION, ""..."1.1.0") do
context "when comparing to a Set-like object" do
it "returns true if passed a Set-like object that self is a proper subset of" do
Set[1, 2, 3].proper_subset?(SetSpecs::SetLike.new([1, 2, 3, 4])).should be_true
end
end
end
end

Просмотреть файл

@ -33,9 +33,11 @@ describe "Set#subset?" do
-> { Set[].subset?(Object.new) }.should raise_error(ArgumentError)
end
context "when comparing to a Set-like object" do
it "returns true if passed a Set-like object that self is a subset of" do
Set[1, 2, 3].subset?(SetSpecs::SetLike.new([1, 2, 3, 4])).should be_true
version_is(Set::VERSION, ""..."1.1.0") do
context "when comparing to a Set-like object" do
it "returns true if passed a Set-like object that self is a subset of" do
Set[1, 2, 3].subset?(SetSpecs::SetLike.new([1, 2, 3, 4])).should be_true
end
end
end
end