зеркало из https://github.com/github/ruby.git
Set 1.1 now checks subclass-ness stricter
This commit is contained in:
Родитель
f6e9899e8a
Коммит
dc7785e16b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче