class RSpec::Mocks::Implementation

@private
any number of sub-implementations.
Represents a configured implementation. Takes into account

def actions

def actions
  [initial_action, inner_action, terminal_action].compact
end

def arg_slice_for(args, arity)

def arg_slice_for(args, arity)
  if arity >= 0
    args.slice(0, arity)
  else
    args
  end
end

def arg_slice_for(args, arity)

Given that it lies, we can't trust it and we don't slice the args.

print_arity { |a, b, c| }
But this prints 3:

print_arity { |a, b, c, &bl| }
This prints 1:

def print_arity(&b) puts b.arity; end
Given:
1.8.7's `arity` lies somtimes:
def arg_slice_for(args, arity)
  args
end

def call(*args, &block)

def call(*args, &block)
  actions.map do |action|
    action.call(*arg_slice_for(args, action.arity), &block)
  end.last
end

def present?

def present?
  actions.any?
end