<commit_before>module HTTP
  class Request
    def webmock_signature
      ::WebMock::RequestSignature.new(verb, uri.to_s, {
        headers: headers.to_h,
        body: body
      })<commit_msg>Make it compatible with the newest http.rb version (3.0.0)<commit_after>module HTTP
  class Request
    def webmock_signature
      request_body = if defined?(HTTP::Request::Body)
                       ''.tap { |string| body.each { |part| string << part } }
                     else
                       body
                     end

      ::WebMock::RequestSignature.new(verb, uri.to_s, {
        headers: headers.to_h,
        body: request_body
      })
{'fraction_non_alphanumeric': 0.09908536585365854, 'fraction_numerical': 0.004573170731707317, 'mean_word_length': 1.894273127753304, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3826243', 'n_tokens_mistral': 188, 'n_tokens_neox': 181, 'n_words': 44}