<commit_before>module Rack
  class CamelSnake
    module Formatter
      # hashのkeyを再帰的に変換: blockで変換処理を渡します
      def self.formatter(args, converter)
        case args
          when Hash
            args.reduce({}){ |hash, (key, value)| hash.merge(converter.call(key) => formatter(value, converter){ yield }) }
          when Array
            args.reduce([]){ |array, value| array << formatter(value, converter){ yield } }
          else<commit_msg>deleted useless yield<commit_after>module Rack
  class CamelSnake
    module Formatter
      # hashのkeyを再帰的に変換: blockで変換処理を渡します
      def self.formatter(args, converter)
        case args
          when Hash
            args.reduce({}){ |hash, (key, value)| hash.merge(converter.call(key) => formatter(value, converter)) }
          when Array
            args.reduce([]){ |array, value| array << formatter(value, converter) }
          else
{'fraction_non_alphanumeric': 0.11210762331838565, 'fraction_numerical': 0.0, 'mean_word_length': 2.6153846153846154, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '6180794', 'n_tokens_mistral': 283, 'n_tokens_neox': 277, 'n_words': 65}