class RSpec::Matchers::BuiltIn::Compound::NestedEvaluator
def inner_matcher_block(outer_args)
When such a matcher is used as the outer matcher, we need to forward the
Some block matchers (such as `yield_xyz`) pass args to the `expect` block.
def inner_matcher_block(outer_args) return @actual if outer_args.empty? Proc.new do |*inner_args| unless inner_args.empty? raise ArgumentError, "(#{@matcher_1.description}) and " \ "(#{@matcher_2.description}) cannot be combined in a compound expectation " \ "since both matchers pass arguments to the block." end @actual.call(*outer_args) end end