# File lib/rbreadline.rb, line 7496
  def rl_yank_last_arg(count, key)
    if (@rl_last_func != :rl_yank_last_arg)
      @history_skip = 0
      @explicit_arg_p = @rl_explicit_arg
      @count_passed = count
      @direction = 1
    else
      if (@undo_needed)
        rl_do_undo()
      end
      if (count < 1)
        @direction = -@direction
      end
      @history_skip += @direction
      if (@history_skip < 0)
        @history_skip = 0
      end
    end

    if (@explicit_arg_p)
      retval = rl_yank_nth_arg_internal(@count_passed, key, @history_skip)
    else
      retval = rl_yank_nth_arg_internal('$', key, @history_skip)
    end
    @undo_needed = retval == 0
    retval
  end