diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-20 04:39:56 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-02-20 04:39:56 +0000 |
commit | b7f899681371358e84dbf230796a0a661217c2cd (patch) | |
tree | ac752d47ff6ac5f8d4bbec43e182e441cc1a3311 /spec/ruby/core/enumerator | |
parent | 5e80e9144f88bac3e2d8890c9e2fc22f5e391aff (diff) | |
download | ruby-b7f899681371358e84dbf230796a0a661217c2cd.tar.gz |
* 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
Diffstat (limited to 'spec/ruby/core/enumerator')
-rw-r--r-- | spec/ruby/core/enumerator/chain/rewind_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/core/enumerator/chain/rewind_spec.rb b/spec/ruby/core/enumerator/chain/rewind_spec.rb index 61b07b8c0a..c6b82c831f 100644 --- a/spec/ruby/core/enumerator/chain/rewind_spec.rb +++ b/spec/ruby/core/enumerator/chain/rewind_spec.rb @@ -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 |