class RSpec::Matchers::BuiltIn::YieldProbe

def to_proc

def to_proc
  @used = true
  probe = self
  callback = @callback
  Proc.new do |*args|
    probe.num_yields += 1
    probe.yielded_args << args
    callback.call(*args)
    nil # to indicate the block does not return a meaningful value
  end
end