Sha256: 1965b25db15de54325e97b0263b0ddb225112616e6cddfb39f9ef41c2346f4f9

Contents?: true

Size: 625 Bytes

Versions: 8

Compression:

Stored size: 625 Bytes

Contents

module Mutest
  class Mutator
    class Node
      module Regexp
        # Mutator for regexp capture groups, such as `/(foo)/`
        class CaptureGroup < Node
          handle(:regexp_capture_group)

          children :group

          # Emit mutations
          #
          # Replace `(captured_group)` with `(?:non_captured_group)`
          #
          # @return [undefined]
          def dispatch
            return unless group

            emit(s(:regexp_passive_group, group))
            emit_group_mutations
          end
        end # CaptureGroup
      end # Regexp
    end # Node
  end # Mutator
end # Mutest

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutest-0.0.9 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.8 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.7 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.6 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.5 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.4 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.3 lib/mutest/mutator/node/regexp/capture_group.rb
mutest-0.0.2 lib/mutest/mutator/node/regexp/capture_group.rb