<commit_before>module EncodingSpecs
  class UndefinedConversionError
    def self.exception
      ec = Encoding::Converter.new('utf-8','ascii')
      begin
        ec.convert("\u{8765}")
      rescue Encoding::UndefinedConversionError => e
        e
      end
    end
  end
  
  class UndefinedConversionErrorIndirect
    def self.exception
      ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP")
      begin
        ec.convert("\xA0")
      rescue Encoding::UndefinedConversionError => e
        e
      end
    end
  end
end
<commit_msg>Encoding: Expand fixtures file for InvalidByteSequenceError<commit_after>module EncodingSpecs
  class UndefinedConversionError
    def self.exception
      ec = Encoding::Converter.new('utf-8','ascii')
      begin
        ec.convert("\u{8765}")
      rescue Encoding::UndefinedConversionError => e
        e
      end
    end
  end
  
  class UndefinedConversionErrorIndirect
    def self.exception
      ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP")
      begin
        ec.convert("\xA0")
      rescue Encoding::UndefinedConversionError => e
        e
      end
    end
  end

  class InvalidByteSequenceError
    def self.exception
      ec = Encoding::Converter.new("utf-8", "iso-8859-1")
      begin
        ec.convert("\xf1abcd")
      rescue Encoding::InvalidByteSequenceError => e
        e
      end
    end
  end
  
  class InvalidByteSequenceErrorIndirect
    def self.exception
      ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
      begin
        ec.convert("abc\xA1\xFFdef")
      rescue Encoding::InvalidByteSequenceError => e
        e
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09651802076970067, 'fraction_numerical': 0.021380574221136223, 'mean_word_length': 2.419624217118998, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7037680', 'n_tokens_mistral': 516, 'n_tokens_neox': 500, 'n_words': 105}