Sha256: 4947b14de041ffa483f434591a95ab9b747d06b9ece19320ba677ac43ef69491

Contents?: true

Size: 576 Bytes

Versions: 7

Compression:

Stored size: 576 Bytes

Contents

module Mutant
  class Mutator
    class Node
      # Mutator on AST blocks
      class Block < self

        handle(Rubinius::AST::Block)

      private

        # Emit mutants
        #
        # @return [undefined]
        #
        # @api private
        #
        def dispatch
          array = input.array
          emit_attribute_mutations(:array) do |mutation|
            array = mutation.array
            # Do not generate empty bodies
            if array.empty?
              array << new_nil
            end
          end
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mutant-0.2.12 lib/mutant/mutator/node/block.rb
mutant-0.2.11 lib/mutant/mutator/node/block.rb
mutant-0.2.9 lib/mutant/mutator/node/block.rb
mutant-0.2.8 lib/mutant/mutator/node/block.rb
mutant-0.2.7 lib/mutant/mutator/node/block.rb
mutant-0.2.6 lib/mutant/mutator/node/block.rb
mutant-0.2.5 lib/mutant/mutator/node/block.rb