1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* spec/ruby: Tweak Enuemrator::Chain#rewind spec so that arity of block matches what is yielded

Calling `and_yield(*args)` adds an implicit expectation that all the `args` are passed to a block that can accept them, even though blocks that are not lambda-like don't mind extra arguments.
It so happens that this spec passed on Ruby 2.6.1 See [Bug #15613]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
marcandre 2019-02-20 04:39:56 +00:00
parent 5e80e9144f
commit b7f8996813

View file

@ -4,9 +4,9 @@ ruby_version_is "2.6" do
describe "Enumerator::Chain#rewind" do
before(:each) do
@obj = mock('obj')
@obj.should_receive(:each).any_number_of_times.and_yield(42)
@obj.should_receive(:each).any_number_of_times.and_yield
@second = mock('obj')
@second.should_receive(:each).any_number_of_times.and_yield(:second)
@second.should_receive(:each).any_number_of_times.and_yield
@enum = Enumerator::Chain.new(@obj, @second)
end