<commit_before>module Moon
  # Basic implementation of Set.
  class Set
    include Enumerable

    # @param [#each] enum
    def initialize(enum = nil, &block)
      @data = {}
      if block_given?
        enum.times { |i| add block.call(i) }
      else
        concat enum if enum
      end
    end

    # Returns an Array from the Set elements.
    #
    # @return [Array<Object>]
    def to_a
      @data.keys.to_a
    end

    # Returns the size of the Set.
    #
    # @return [Integer]
    def size
      @data.size
    end

    # Determines if the Set is empty?
    #
    # @return [Boolean]
    def empty?
      @data.empty?
    end

    # Determins if the Set includes a object
    #
    # @param [Object] obj
    # @return [Boolean]
    def include?(obj)
      @data.key?(obj)
    end

    # Yields each object in the Set.
    #
    # @yieldparam [Object] obj
    def each(&block)
      return to_enum :each unless block_given?<commit_msg>std: Added Set#blank?<commit_after>module Moon
  # Basic implementation of Set.
  class Set
    include Enumerable

    # @param [#each] enum
    def initialize(enum = nil, &block)
      @data = {}
      if block_given?
        enum.times { |i| add block.call(i) }
      else
        concat enum if enum
      end
    end

    # Returns an Array from the Set elements.
    #
    # @return [Array<Object>]
    def to_a
      @data.keys.to_a
    end

    # Returns the size of the Set.
    #
    # @return [Integer]
    def size
      @data.size
    end

    # Determines if the Set is empty?
    #
    # @return [Boolean]
    def empty?
      @data.empty?
    end

    # Determines if the Set is blank?
    #
    # @return [Boolean]
    def blank?
      empty?
    end

    # Determins if the Set includes a object
    #
    # @param [Object] obj
    # @return [Boolean]
    def include?(obj)
      @data.key?(obj)
    end

    # Yields each object in the Set.
    #
    # @yieldparam [Object] obj
    def each(&block)
      return to_enum :each unless block_given?
{'fraction_non_alphanumeric': 0.09528535980148883, 'fraction_numerical': 0.0, 'mean_word_length': 1.867709815078236, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '333088', 'n_tokens_mistral': 678, 'n_tokens_neox': 648, 'n_words': 213}