diff options
Diffstat (limited to 'spec/ruby/core/enumerable/any_spec.rb')
-rw-r--r-- | spec/ruby/core/enumerable/any_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/ruby/core/enumerable/any_spec.rb b/spec/ruby/core/enumerable/any_spec.rb index 636b1fa450..243f8735d5 100644 --- a/spec/ruby/core/enumerable/any_spec.rb +++ b/spec/ruby/core/enumerable/any_spec.rb @@ -145,7 +145,6 @@ describe "Enumerable#any?" do pattern.yielded.should == [[0], [1], [2]] end - # may raise an exception in future versions it "always returns false on empty enumeration" do @empty.any?(Integer).should == false [].any?(Integer).should == false @@ -191,5 +190,11 @@ describe "Enumerable#any?" do multi.any?(pattern).should == false pattern.yielded.should == [[[1, 2]], [[3, 4, 5]], [[6, 7, 8, 9]]] end + + it "ignores the block if there is an argument" do + -> { + EnumerableSpecs::Numerous.new(1, 2, 3, 4, 5).any?(String) { true }.should == false + }.should complain(/given block not used/) + end end end |