Previously, it raised a confusing error when multiple yields occurred: > The yield_control matcher is not designed to be used with a > method that yields multiple times. Use the yield_successive_args > matcher for that case. This was confusing because yield_control has supported multiple yields for awhile. This also simplifies the implementation!
The new implementation in 3.0.0 allowed this to pass: expect().to contain_exactly() The problem was that the `actual_matches` hash was lazily initialized in an `expected.each_with_index` loop. This meant that if `expected` was empty, `actual_matches` would be made empty as well, causing the match logic to pass. Fixes #581.