<commit_before>module Foreigner
  module ConnectionAdapters
    module SchemaStatements
      def self.included(base)
        base::AbstractAdapter.class_eval do
          include Foreigner::ConnectionAdapters::AbstractAdapter
        end
      end
    end
    
    module AbstractAdapter
      def create_table(table_name, *args, &block)
        definition = nil
        super do |td|
          definition = td # This is my trick to get the definition
          block.call(td)
        end
        definition.foreign_keys.each do |to_table, options_list|
          options_list.each do |options|
            add_foreign_key(table_name, to_table, options)
          end
        end
      end

      def supports_foreign_keys?
        false
      end

      # Adds a new foreign key to the +from_table+, referencing the primary key of +to_table+
      #
      # The foreign key will be named after the from and to tables unless you pass
      # <tt>:name</tt> as an option.
      #
      # ===== Examples<commit_msg>fix AbstractAdapter.create_table when a block isn't provided<commit_after>module Foreigner
  module ConnectionAdapters
    module SchemaStatements
      def self.included(base)
        base::AbstractAdapter.class_eval do
          include Foreigner::ConnectionAdapters::AbstractAdapter
        end
      end
    end
    
    module AbstractAdapter
      def create_table(table_name, *args, &block)
        definition = nil
        super do |td|
          definition = td # This is my trick to get the definition
          block.call(td) unless block.nil?
        end
        definition.foreign_keys.each do |to_table, options_list|
          options_list.each do |options|
            add_foreign_key(table_name, to_table, options)
          end
        end
      end

      def supports_foreign_keys?
        false
      end

      # Adds a new foreign key to the +from_table+, referencing the primary key of +to_table+
      #
      # The foreign key will be named after the from and to tables unless you pass
      # <tt>:name</tt> as an option.
      #
      # ===== Examples
{'fraction_non_alphanumeric': 0.062111801242236024, 'fraction_numerical': 0.0, 'mean_word_length': 2.167927382753404, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '256756', 'n_tokens_mistral': 573, 'n_tokens_neox': 551, 'n_words': 185}