<commit_before>module Anaphora
  class BlankSlate
    instance_methods.each {|m| undef_method(m) unless m =~ /^__/}
  end

  class MethodInvocation < Struct.new(:name, :args, :block)
    def send_to(target)
      target.send(name, *args, &block)
    end
  end

  class Proxy < BlankSlate

    def initialize
      @methods = []
    end

    def to_proc
      lambda {|it| @methods.inject(it) {|target, method| method.send_to(target) }}
    end

    def method_missing(name, *args, &block)
      return self if name == :respond_to? && args.first == :to_proc
      @methods << MethodInvocation.new(name, args, block)
      self
    end

  end
end

module Kernel
  def it
    Anaphora::Proxy.new
  end
  alias_method :its, :it
end<commit_msg>more correct reply to respond_to?<commit_after>module Anaphora
  class BlankSlate
    instance_methods.each {|m| undef_method(m) unless m =~ /^__/}
  end

  class MethodInvocation < Struct.new(:name, :args, :block)
    def send_to(target)
      target.send(name, *args, &block)
    end
  end

  class Proxy < BlankSlate

    def initialize
      @methods = []
    end

    def to_proc
      lambda {|it| @methods.inject(it) {|target, method| method.send_to(target) }}
    end

    def method_missing(name, *args, &block)
      return true if name == :respond_to? && args.first == :to_proc
      @methods << MethodInvocation.new(name, args, block)
      self
    end

  end
end

module Kernel
  def it
    Anaphora::Proxy.new
  end
  alias_method :its, :it
end
{'fraction_non_alphanumeric': 0.11281708945260348, 'fraction_numerical': 0.0, 'mean_word_length': 2.9343832020997374, 'pattern_counts': {'":': 0, '<': 11, '<?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': '714052', 'n_tokens_mistral': 530, 'n_tokens_neox': 511, 'n_words': 137}