<commit_before>require 'active_support/core_ext/object/deep_dup'
require 'middleman-core/util'

module Middleman
  module Pagination
    module ArrayHelpers
      def per_page(per_page)
        return enum_for(:per_page, per_page) unless block_given?

        parts = if per_page.respond_to? :call
          per_page.call(dup)
        else
          each_slice(per_page).reduce([]) do |sum, items|
            sum << items
          end
        end

        num_pages = parts.length
        collection = self

        current_start_i = 0
        parts.each_with_index do |items, i|
          num = i + 1

          meta = ::Middleman::Pagination.page_locals(
            num,
            num_pages,
            collection,
            items,
            current_start_i
          )
<commit_msg>stylistic change<commit_after>require 'active_support/core_ext/object/deep_dup'
require 'middleman-core/util'

module Middleman
  module Pagination
    module ArrayHelpers
      def per_page(per_page)
        return to_enum(__method__, per_page) unless block_given?

        parts = if per_page.respond_to? :call
          per_page.call(dup)
        else
          each_slice(per_page).reduce([]) do |sum, items|
            sum << items
          end
        end

        num_pages = parts.length
        collection = self

        current_start_i = 0
        parts.each_with_index do |items, i|
          num = i + 1

          meta = ::Middleman::Pagination.page_locals(
            num,
            num_pages,
            collection,
            items,
            current_start_i
          )

{'fraction_non_alphanumeric': 0.07479572595851666, 'fraction_numerical': 0.00251414204902577, 'mean_word_length': 1.792982456140351, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1091300', 'n_tokens_mistral': 476, 'n_tokens_neox': 461, 'n_words': 103}