зеркало из https://github.com/github/ruby.git
rid of warnings [Fix GH-1953]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
aafeb4b724
Коммит
257d00223d
|
@ -142,10 +142,13 @@ describe "Enumerable#all?" do
|
|||
pattern.yielded.should == [[0], [1], [2], [-1]]
|
||||
end
|
||||
|
||||
it "ignores block" do
|
||||
@enum2.all?(NilClass) { raise }.should == false
|
||||
[1, 2, nil].all?(NilClass) { raise }.should == false
|
||||
{a: 1}.all?(Array) { raise }.should == true
|
||||
# may raise an exception in future versions
|
||||
ruby_version_is ""..."2.6" do
|
||||
it "ignores block" do
|
||||
@enum2.all?(NilClass) { raise }.should == false
|
||||
[1, 2, nil].all?(NilClass) { raise }.should == false
|
||||
{a: 1}.all?(Array) { raise }.should == true
|
||||
end
|
||||
end
|
||||
|
||||
it "always returns true on empty enumeration" do
|
||||
|
|
|
@ -155,10 +155,13 @@ describe "Enumerable#any?" do
|
|||
pattern.yielded.should == [[0], [1], [2]]
|
||||
end
|
||||
|
||||
it "ignores block" do
|
||||
@enum2.any?(NilClass) { raise }.should == true
|
||||
[1, 2, nil].any?(NilClass) { raise }.should == true
|
||||
{a: 1}.any?(Array) { raise }.should == true
|
||||
# may raise an exception in future versions
|
||||
ruby_version_is ""..."2.6" do
|
||||
it "ignores block" do
|
||||
@enum2.any?(NilClass) { raise }.should == true
|
||||
[1, 2, nil].any?(NilClass) { raise }.should == true
|
||||
{a: 1}.any?(Array) { raise }.should == true
|
||||
end
|
||||
end
|
||||
|
||||
it "always returns false on empty enumeration" do
|
||||
|
|
|
@ -111,10 +111,13 @@ describe "Enumerable#none?" do
|
|||
pattern.yielded.should == [[0], [1], [2], [-1]]
|
||||
end
|
||||
|
||||
it "ignores block" do
|
||||
@enum2.none?(Integer) { raise }.should == true
|
||||
[1, 2, nil].none?(TrueClass) { raise }.should == true
|
||||
{a: 1}.none?(Hash) { raise }.should == true
|
||||
# may raise an exception in future versions
|
||||
ruby_version_is ""..."2.6" do
|
||||
it "ignores block" do
|
||||
@enum2.none?(Integer) { raise }.should == true
|
||||
[1, 2, nil].none?(TrueClass) { raise }.should == true
|
||||
{a: 1}.none?(Hash) { raise }.should == true
|
||||
end
|
||||
end
|
||||
|
||||
it "always returns true on empty enumeration" do
|
||||
|
|
|
@ -102,10 +102,13 @@ describe "Enumerable#one?" do
|
|||
pattern.yielded.should == [[0], [1], [2], [-1]]
|
||||
end
|
||||
|
||||
it "ignores block" do
|
||||
@enum2.one?(NilClass) { raise }.should == true
|
||||
[1, 2, nil].one?(NilClass) { raise }.should == true
|
||||
{a: 1}.one?(Array) { raise }.should == true
|
||||
# may raise an exception in future versions
|
||||
ruby_version_is ""..."2.6" do
|
||||
it "ignores block" do
|
||||
@enum2.one?(NilClass) { raise }.should == true
|
||||
[1, 2, nil].one?(NilClass) { raise }.should == true
|
||||
{a: 1}.one?(Array) { raise }.should == true
|
||||
end
|
||||
end
|
||||
|
||||
it "always returns false on empty enumeration" do
|
||||
|
|
Загрузка…
Ссылка в новой задаче