mutant 0.11.25 → 0.11.27

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 582339f240c2c234a6130ff32d7c998318b9b82670321483d5b66351524acfb9
4
- data.tar.gz: 1f027e4239fc3bb5b518e796249ab4ac9cf2902d938995adfbd276af2fb69951
3
+ metadata.gz: 594919332bf75ff59d19206e356cc568d4b59c859dd2d6eccc459805e3445cf3
4
+ data.tar.gz: c8e919b4826b6596c51ce26c8ca2eda5ff19e50bc1e8ff785b48ab479e6ad42f
5
5
  SHA512:
6
- metadata.gz: 823420ff1abcf0b8ac2e8c79012962a355f85324195cefc4d1daf9a60537f5773d2d125ec76881462b6f59d61081a2875c9f5c168ede8cbab190f7cc45a9a665
7
- data.tar.gz: 1ebafd946b6b3404835653a3a024e655b9961d418247201ba14080fb772df20cab6295609acaee00d41bd9820f8fdb492b8b0606791435be395f863588cde104
6
+ metadata.gz: e0e91da3e7ed933633c00ba849f502df74bff6407afaed8f2f7bfe167efb4d100bf89eac7ea4f7cf3872a2b257a0093d0c359956f01ea4365f870fd1ce731132
7
+ data.tar.gz: ed1f39b700889360dd049edd5dc00391fc978b7be64cf3f0662e890d39a9b8b1b2001f6df3291b3760e9866f48efc32b344b84ded8d94921ad12a29e089bc748
@@ -6,7 +6,7 @@ module Mutant
6
6
  # rubocop:disable Metrics/ClassLength
7
7
  class Lexer
8
8
  WHITESPACE = [' ', "\t", "\n"].to_set.freeze
9
- STRING_PATTERN = /\A[a-zA-Z][_a-zA-Z0-9]*\z/.freeze
9
+ STRING_PATTERN = /\A[a-zA-Z][_a-zA-Z0-9]*\z/
10
10
 
11
11
  SINGLE_CHAR =
12
12
  {
@@ -5,7 +5,7 @@ module Mutant
5
5
  class Descendants < self
6
6
  include Anima.new(:const_name)
7
7
 
8
- REGEXP = /\Adescendants:(?<const_name>.+)\z/.freeze
8
+ REGEXP = /\Adescendants:(?<const_name>.+)\z/
9
9
 
10
10
  def syntax
11
11
  "descendants:#{const_name}"
@@ -20,11 +20,11 @@ module Mutant
20
20
  '#' => [Matcher::Methods::Instance].freeze
21
21
  }.freeze
22
22
 
23
- METHOD_NAME_PATTERN = /(?<method_name>.+)/.freeze
23
+ METHOD_NAME_PATTERN = /(?<method_name>.+)/
24
24
 
25
25
  private_constant(*constants(false))
26
26
 
27
- REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}#{METHOD_NAME_PATTERN}\z/.freeze
27
+ REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}#{METHOD_NAME_PATTERN}\z/
28
28
 
29
29
  def initialize(*)
30
30
  super
@@ -19,7 +19,7 @@ module Mutant
19
19
 
20
20
  private_constant(*constants(false))
21
21
 
22
- REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}\z/.freeze
22
+ REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}\z/
23
23
 
24
24
  def initialize(*)
25
25
  super
@@ -9,7 +9,7 @@ module Mutant
9
9
 
10
10
  # Recursive namespace expression
11
11
  class Recursive < self
12
- REGEXP = /\A#{SCOPE_NAME_PATTERN}?\*\z/.freeze
12
+ REGEXP = /\A#{SCOPE_NAME_PATTERN}?\*\z/
13
13
 
14
14
  # Initialize object
15
15
  #
@@ -17,7 +17,7 @@ module Mutant
17
17
  def initialize(*)
18
18
  super
19
19
 
20
- @syntax = "#{scope_name}*".freeze # rubocop:disable Style/RedundantFreeze
20
+ @syntax = "#{scope_name}*".freeze
21
21
 
22
22
  @recursion_pattern = Regexp.union(
23
23
  /\A#{scope_name}\z/,
@@ -60,7 +60,7 @@ module Mutant
60
60
  MATCHER = Matcher::Scope
61
61
  private_constant(*constants(false))
62
62
 
63
- REGEXP = /\A#{SCOPE_NAME_PATTERN}\z/.freeze
63
+ REGEXP = /\A#{SCOPE_NAME_PATTERN}\z/
64
64
 
65
65
  # Matcher matcher on expression
66
66
  #
@@ -4,8 +4,8 @@ module Mutant
4
4
 
5
5
  # Abstract base class for match expression
6
6
  class Expression
7
- fragment = /[A-Za-z][A-Za-z\d_]*/.freeze
8
- SCOPE_NAME_PATTERN = /(?<scope_name>#{fragment}(?:#{SCOPE_OPERATOR}#{fragment})*)/.freeze
7
+ fragment = /[A-Za-z][A-Za-z\d_]*/
8
+ SCOPE_NAME_PATTERN = /(?<scope_name>#{fragment}(?:#{SCOPE_OPERATOR}#{fragment})*)/
9
9
  SCOPE_SYMBOL_PATTERN = '(?<scope_symbol>[.#])'
10
10
 
11
11
  private_constant(*constants(false))
@@ -6,11 +6,11 @@ module Mutant
6
6
  class Repository
7
7
  include Anima.new(:host, :path)
8
8
 
9
- REMOTE_REGEXP = /\A[^\t]+\t(?<url>[^ ]+) \((?:fetch|push)\)\n\z/.freeze
10
- GIT_SSH_REGEXP = %r{\A[^@]+@(?<host>[^:/]+)[:/](?<path>.+?)(?:\.git)?\z}.freeze
11
- GIT_HTTPS_REGEXP = %r{\Ahttps://(?<host>[^/]+)/(?<path>.+?)(?:\.git)?\z}.freeze
9
+ REMOTE_REGEXP = /\A[^\t]+\t(?<url>[^ ]+) \((?:fetch|push)\)\n\z/
10
+ GIT_SSH_REGEXP = %r{\A[^@]+@(?<host>[^:/]+)[:/](?<path>.+?)(?:\.git)?\z}
11
+ GIT_HTTPS_REGEXP = %r{\Ahttps://(?<host>[^/]+)/(?<path>.+?)(?:\.git)?\z}
12
12
  WILDCARD = '/*'
13
- WILDCARD_RANGE = (..-WILDCARD.length).freeze
13
+ WILDCARD_RANGE = (..-WILDCARD.length)
14
14
 
15
15
  private_constant(*constants(false))
16
16
 
data/lib/mutant/loader.rb CHANGED
@@ -5,7 +5,7 @@ module Mutant
5
5
  include Anima.new(:binding, :kernel, :source, :subject)
6
6
 
7
7
  FROZEN_STRING_FORMAT = "# frozen_string_literal: true\n%s"
8
- VOID_VALUE_REGEXP = /\A[^:]+:\d+: void value expression/.freeze
8
+ VOID_VALUE_REGEXP = /\A[^:]+:\d+: void value expression/
9
9
 
10
10
  private_constant(*constants(false))
11
11
 
@@ -11,7 +11,7 @@ module Mutant
11
11
  :diffs
12
12
  )
13
13
 
14
- INSPECT_FORMAT = "#<#{self} %s>"
14
+ INSPECT_FORMAT = "#<#{self} %s>".freeze
15
15
  ATTRIBUTE_DELIMITER = ' '
16
16
  ATTRIBUTE_FORMAT = '%s: [%s]'
17
17
  ENUM_DELIMITER = ','
@@ -49,7 +49,7 @@ module Mutant
49
49
 
50
50
  def merge(other)
51
51
  with(
52
- ignore_patterns: other.ignore_patterns,
52
+ ignore_patterns: other.ignore_patterns.any? ? other.ignore_patterns : ignore_patterns,
53
53
  operators: other.operators || operators,
54
54
  timeout: other.timeout || timeout
55
55
  )
@@ -7,7 +7,7 @@ module Mutant
7
7
  include Anima.new(:subject, :node)
8
8
 
9
9
  CODE_DELIMITER = "\0"
10
- CODE_RANGE = (..4).freeze
10
+ CODE_RANGE = (..4)
11
11
 
12
12
  # Mutation identification code
13
13
  #
@@ -5,7 +5,7 @@ module Mutant
5
5
  class Node
6
6
  # Base mutator for index operations
7
7
  class Index < self
8
- NO_VALUE_RANGE = (1..-1).freeze
8
+ NO_VALUE_RANGE = (1..-1)
9
9
  SEND_REPLACEMENTS = %i[at fetch key?].freeze
10
10
 
11
11
  private_constant(*constants(false))
@@ -67,7 +67,7 @@ module Mutant
67
67
 
68
68
  # Mutator for index assignments
69
69
  class Assign < self
70
- REGULAR_RANGE = (1..-2).freeze
70
+ REGULAR_RANGE = (1..-2)
71
71
 
72
72
  private_constant(*constants(false))
73
73
 
@@ -18,7 +18,7 @@ module Mutant
18
18
 
19
19
  # Named value access emitter for instance variables
20
20
  class Ivar < Access
21
- NAME_RANGE = (1..-1).freeze
21
+ NAME_RANGE = (1..-1)
22
22
 
23
23
  handle(:ivar)
24
24
 
@@ -12,7 +12,7 @@ module Mutant
12
12
 
13
13
  define_named_child(:else_body, -1)
14
14
 
15
- RESCUE_INDICES = (1..-2).freeze
15
+ RESCUE_INDICES = (1..-2)
16
16
 
17
17
  private
18
18
 
@@ -7,7 +7,7 @@ module Mutant
7
7
  # Mutator for attribute assignments
8
8
  class AttributeAssignment < self
9
9
 
10
- ATTRIBUTE_RANGE = (..-2).freeze
10
+ ATTRIBUTE_RANGE = (..-2)
11
11
 
12
12
  private_constant(*constants(false))
13
13
 
@@ -206,6 +206,7 @@ module Mutant
206
206
  emit(receiver) if receiver && !left_op_assignment?
207
207
  end
208
208
 
209
+ # rubocop:disable Style/HashEachMethods - its not a hash ;)
209
210
  def mutate_arguments
210
211
  emit_type(receiver, selector)
211
212
  remaining_children_with_index.each do |_node, index|
@@ -4,8 +4,8 @@ module Mutant
4
4
  module Repository
5
5
  class Diff
6
6
  module Ranges
7
- DECIMAL = /(?:0|[1-9]\d*)/.freeze
8
- REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))? @@/.freeze
7
+ DECIMAL = /(?:0|[1-9]\d*)/
8
+ REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))? @@/
9
9
 
10
10
  private_constant(*constants(false))
11
11
 
@@ -6,7 +6,7 @@ module Mutant
6
6
  class Diff
7
7
  include Adamantium, Anima.new(:world, :to)
8
8
 
9
- FORMAT = /\A:\d{6} \d{6} [a-f\d]{40} [a-f\d]{40} [ACDMRTUX]\t(.*)\n\z/.freeze
9
+ FORMAT = /\A:\d{6} \d{6} [a-f\d]{40} [a-f\d]{40} [ACDMRTUX]\t(.*)\n\z/
10
10
 
11
11
  private_constant(*constants(false))
12
12
 
@@ -85,8 +85,8 @@ module Mutant
85
85
  class Path
86
86
  include Adamantium, Anima.new(:world, :to, :path)
87
87
 
88
- DECIMAL = /(?:0|[1-9]\d*)/.freeze
89
- REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))? @@/.freeze
88
+ DECIMAL = /(?:0|[1-9]\d*)/
89
+ REGEXP = /\A@@ -(#{DECIMAL})(?:,(#{DECIMAL}))? \+(#{DECIMAL})(?:,(#{DECIMAL}))? @@/
90
90
 
91
91
  private_constant(*constants(false))
92
92
 
@@ -7,8 +7,8 @@ module Mutant
7
7
 
8
8
  DEFAULT = new(inline_disable: false, mutation: Mutation::Config::DEFAULT)
9
9
 
10
- DISABLE_REGEXP = /(\s|^)mutant:disable(?:\s|$)/.freeze
11
- SYNTAX_REGEXP = /\A(?:#|=begin\n)/.freeze
10
+ DISABLE_REGEXP = /(\s|^)mutant:disable(?:\s|$)/
11
+ SYNTAX_REGEXP = /\A(?:#|=begin\n)/
12
12
 
13
13
  def self.parse(comments:, mutation:)
14
14
  new(
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.11.25'
5
+ VERSION = '0.11.27'
6
6
  end # Mutant
data/lib/mutant.rb CHANGED
@@ -63,8 +63,8 @@ module Mutant
63
63
 
64
64
  env_key = /[a-zA-Z_\d]+/
65
65
 
66
- ENV_VARIABLE_KEY_VALUE_REGEXP = /\A(?<key>#{env_key}+)=(?<value>.*)\z/.freeze
67
- ENV_VARIABLE_KEY_REGEXP = /\A#{env_key}\z/.freeze
66
+ ENV_VARIABLE_KEY_VALUE_REGEXP = /\A(?<key>#{env_key}+)=(?<value>.*)\z/
67
+ ENV_VARIABLE_KEY_REGEXP = /\A#{env_key}\z/
68
68
 
69
69
  # rubocop:disable Metrics/BlockLength
70
70
  record.call(:require_mutant_lib) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.25
4
+ version: 0.11.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-18 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -30,20 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.2
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 3.2.2.4
33
+ version: 3.3.0
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: 3.2.2
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 3.2.2.4
40
+ version: 3.3.0
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: regexp_parser
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -373,14 +367,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
373
367
  requirements:
374
368
  - - ">="
375
369
  - !ruby/object:Gem::Version
376
- version: '2.7'
370
+ version: '3.0'
377
371
  required_rubygems_version: !ruby/object:Gem::Requirement
378
372
  requirements:
379
373
  - - ">="
380
374
  - !ruby/object:Gem::Version
381
375
  version: '0'
382
376
  requirements: []
383
- rubygems_version: 3.4.10
377
+ rubygems_version: 3.5.3
384
378
  signing_key:
385
379
  specification_version: 4
386
380
  summary: ''