<commit_before># encoding: utf-8

require 'faraday'

module BitBucket
  class Response::Helpers < Response

    def on_complete(env)
      env[:body].class.class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
        include BitBucket::Result

        def env
          @env
        end

      RUBY_EVAL
      env[:body].instance_eval { @env = env }
    end

  end # Response::Helpers
end # BitBucket<commit_msg>extend only the result instance's eigenclass, not all instances of that instance's type<commit_after># encoding: utf-8

require 'faraday'

module BitBucket
  class Response::Helpers < Response

    def on_complete(env)
      env[:body].extend BitBucket::Result
      env[:body].define_singleton_method(:env) { env }
    end

  end # Response::Helpers
end # BitBucket
{'fraction_non_alphanumeric': 0.09573091849935317, 'fraction_numerical': 0.0038809831824062097, 'mean_word_length': 3.2527472527472527, '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': '1875375', 'n_tokens_mistral': 242, 'n_tokens_neox': 232, 'n_words': 64}