mutant 0.9.8 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +2 -2
  3. data/Changelog.md +6 -0
  4. data/README.md +63 -23
  5. data/config/reek.yml +1 -0
  6. data/lib/mutant.rb +4 -0
  7. data/lib/mutant/ast.rb +0 -9
  8. data/lib/mutant/ast/find_metaclass_containing.rb +48 -0
  9. data/lib/mutant/ast/meta/send.rb +0 -6
  10. data/lib/mutant/bootstrap.rb +0 -36
  11. data/lib/mutant/cli.rb +5 -49
  12. data/lib/mutant/color.rb +0 -3
  13. data/lib/mutant/config.rb +0 -8
  14. data/lib/mutant/context.rb +0 -3
  15. data/lib/mutant/diff.rb +0 -17
  16. data/lib/mutant/env.rb +0 -6
  17. data/lib/mutant/expression/method.rb +6 -6
  18. data/lib/mutant/expression/methods.rb +6 -6
  19. data/lib/mutant/expression/parser.rb +0 -6
  20. data/lib/mutant/integration.rb +0 -18
  21. data/lib/mutant/isolation/fork.rb +0 -22
  22. data/lib/mutant/license.rb +11 -0
  23. data/lib/mutant/matcher.rb +0 -14
  24. data/lib/mutant/matcher/config.rb +0 -11
  25. data/lib/mutant/matcher/method.rb +0 -31
  26. data/lib/mutant/matcher/method/instance.rb +0 -8
  27. data/lib/mutant/matcher/method/metaclass.rb +86 -0
  28. data/lib/mutant/matcher/method/singleton.rb +0 -25
  29. data/lib/mutant/matcher/methods.rb +17 -28
  30. data/lib/mutant/matcher/namespace.rb +0 -10
  31. data/lib/mutant/matcher/scope.rb +2 -4
  32. data/lib/mutant/meta/example/dsl.rb +0 -21
  33. data/lib/mutant/meta/example/verification.rb +0 -20
  34. data/lib/mutant/mutation.rb +0 -3
  35. data/lib/mutant/mutator.rb +1 -29
  36. data/lib/mutant/mutator/node.rb +1 -66
  37. data/lib/mutant/mutator/node/and_asgn.rb +0 -3
  38. data/lib/mutant/mutator/node/argument.rb +0 -15
  39. data/lib/mutant/mutator/node/arguments.rb +0 -20
  40. data/lib/mutant/mutator/node/begin.rb +0 -3
  41. data/lib/mutant/mutator/node/binary.rb +0 -23
  42. data/lib/mutant/mutator/node/block.rb +0 -15
  43. data/lib/mutant/mutator/node/break.rb +0 -3
  44. data/lib/mutant/mutator/node/case.rb +0 -9
  45. data/lib/mutant/mutator/node/class.rb +0 -3
  46. data/lib/mutant/mutator/node/conditional_loop.rb +0 -3
  47. data/lib/mutant/mutator/node/const.rb +0 -3
  48. data/lib/mutant/mutator/node/define.rb +0 -11
  49. data/lib/mutant/mutator/node/defined.rb +0 -3
  50. data/lib/mutant/mutator/node/dstr.rb +0 -3
  51. data/lib/mutant/mutator/node/dsym.rb +0 -3
  52. data/lib/mutant/mutator/node/generic.rb +0 -3
  53. data/lib/mutant/mutator/node/if.rb +0 -12
  54. data/lib/mutant/mutator/node/index.rb +0 -27
  55. data/lib/mutant/mutator/node/kwbegin.rb +0 -3
  56. data/lib/mutant/mutator/node/literal.rb +0 -3
  57. data/lib/mutant/mutator/node/literal/array.rb +0 -6
  58. data/lib/mutant/mutator/node/literal/boolean.rb +0 -4
  59. data/lib/mutant/mutator/node/literal/float.rb +0 -9
  60. data/lib/mutant/mutator/node/literal/hash.rb +0 -9
  61. data/lib/mutant/mutator/node/literal/integer.rb +0 -9
  62. data/lib/mutant/mutator/node/literal/nil.rb +0 -3
  63. data/lib/mutant/mutator/node/literal/range.rb +0 -6
  64. data/lib/mutant/mutator/node/literal/regex.rb +0 -6
  65. data/lib/mutant/mutator/node/literal/string.rb +0 -3
  66. data/lib/mutant/mutator/node/literal/symbol.rb +0 -3
  67. data/lib/mutant/mutator/node/masgn.rb +0 -3
  68. data/lib/mutant/mutator/node/match_current_line.rb +0 -3
  69. data/lib/mutant/mutator/node/mlhs.rb +0 -3
  70. data/lib/mutant/mutator/node/named_value/access.rb +2 -14
  71. data/lib/mutant/mutator/node/named_value/constant_assignment.rb +0 -9
  72. data/lib/mutant/mutator/node/named_value/variable_assignment.rb +0 -6
  73. data/lib/mutant/mutator/node/next.rb +0 -3
  74. data/lib/mutant/mutator/node/noop.rb +0 -3
  75. data/lib/mutant/mutator/node/nthref.rb +0 -3
  76. data/lib/mutant/mutator/node/op_asgn.rb +0 -3
  77. data/lib/mutant/mutator/node/or_asgn.rb +0 -3
  78. data/lib/mutant/mutator/node/procarg_zero.rb +0 -3
  79. data/lib/mutant/mutator/node/regopt.rb +0 -6
  80. data/lib/mutant/mutator/node/resbody.rb +0 -6
  81. data/lib/mutant/mutator/node/rescue.rb +2 -19
  82. data/lib/mutant/mutator/node/return.rb +0 -3
  83. data/lib/mutant/mutator/node/sclass.rb +20 -0
  84. data/lib/mutant/mutator/node/send.rb +2 -61
  85. data/lib/mutant/mutator/node/send/attribute_assignment.rb +0 -9
  86. data/lib/mutant/mutator/node/send/binary.rb +0 -11
  87. data/lib/mutant/mutator/node/send/conditional.rb +0 -3
  88. data/lib/mutant/mutator/node/splat.rb +0 -3
  89. data/lib/mutant/mutator/node/super.rb +0 -3
  90. data/lib/mutant/mutator/node/when.rb +0 -19
  91. data/lib/mutant/mutator/node/yield.rb +0 -3
  92. data/lib/mutant/mutator/node/zsuper.rb +0 -3
  93. data/lib/mutant/mutator/util/array.rb +0 -6
  94. data/lib/mutant/mutator/util/symbol.rb +0 -3
  95. data/lib/mutant/parallel.rb +0 -13
  96. data/lib/mutant/parallel/driver.rb +0 -10
  97. data/lib/mutant/parallel/worker.rb +0 -22
  98. data/lib/mutant/reporter/cli.rb +0 -5
  99. data/lib/mutant/reporter/cli/format.rb +0 -9
  100. data/lib/mutant/reporter/cli/printer.rb +0 -40
  101. data/lib/mutant/reporter/cli/printer/env_progress.rb +0 -15
  102. data/lib/mutant/reporter/cli/printer/isolation_result.rb +0 -18
  103. data/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +0 -5
  104. data/lib/mutant/reporter/cli/printer/mutation_result.rb +0 -21
  105. data/lib/mutant/reporter/cli/printer/status_progressive.rb +0 -8
  106. data/lib/mutant/reporter/cli/printer/subject_progress.rb +0 -9
  107. data/lib/mutant/repository/diff.rb +1 -13
  108. data/lib/mutant/repository/diff/ranges.rb +0 -11
  109. data/lib/mutant/result.rb +0 -3
  110. data/lib/mutant/runner.rb +0 -18
  111. data/lib/mutant/runner/sink.rb +0 -5
  112. data/lib/mutant/subject.rb +0 -8
  113. data/lib/mutant/subject/method.rb +0 -3
  114. data/lib/mutant/subject/method/instance.rb +0 -5
  115. data/lib/mutant/subject/method/metaclass.rb +30 -0
  116. data/lib/mutant/transform.rb +0 -92
  117. data/lib/mutant/version.rb +1 -1
  118. data/lib/mutant/warnings.rb +0 -6
  119. data/lib/mutant/zombifier.rb +2 -34
  120. data/meta/and.rb +0 -2
  121. data/meta/array.rb +0 -3
  122. data/meta/begin.rb +0 -3
  123. data/meta/block.rb +0 -3
  124. data/meta/break.rb +0 -1
  125. data/meta/case.rb +0 -6
  126. data/meta/casgn.rb +0 -3
  127. data/meta/cvasgn.rb +0 -1
  128. data/meta/def.rb +0 -7
  129. data/meta/ensure.rb +0 -1
  130. data/meta/false.rb +0 -1
  131. data/meta/gvasgn.rb +0 -1
  132. data/meta/hash.rb +0 -4
  133. data/meta/if.rb +0 -5
  134. data/meta/ivasgn.rb +0 -1
  135. data/meta/kwbegin.rb +0 -1
  136. data/meta/lvasgn.rb +0 -1
  137. data/meta/match_current_line.rb +0 -1
  138. data/meta/next.rb +0 -1
  139. data/meta/or.rb +0 -2
  140. data/meta/regexp.rb +0 -1
  141. data/meta/rescue.rb +0 -6
  142. data/meta/sclass.rb +12 -0
  143. data/meta/send.rb +0 -4
  144. data/meta/true.rb +0 -1
  145. data/meta/until.rb +0 -1
  146. data/meta/while.rb +0 -2
  147. data/meta/yield.rb +0 -1
  148. data/mutant.sh +12 -0
  149. data/spec/unit/mutant/ast/find_metaclass_containing_spec.rb +64 -0
  150. data/spec/unit/mutant/expression/methods_spec.rb +7 -2
  151. data/spec/unit/mutant/license_spec.rb +15 -3
  152. data/spec/unit/mutant/matcher/method/metaclass_spec.rb +108 -0
  153. data/spec/unit/mutant/matcher/methods/metaclass_spec.rb +62 -0
  154. data/spec/unit/mutant/matcher/namespace_spec.rb +3 -1
  155. data/spec/unit/mutant/matcher/scope_spec.rb +11 -1
  156. data/spec/unit/mutant/meta/example_spec.rb +3 -3
  157. data/spec/unit/mutant/mutator/node_spec.rb +1 -6
  158. data/spec/unit/mutant/subject/method/metaclass_spec.rb +63 -0
  159. data/test_app/lib/test_app.rb +1 -0
  160. data/test_app/lib/test_app/metaclasses.rb +108 -0
  161. metadata +17 -2
@@ -42,32 +42,20 @@ module Mutant
42
42
 
43
43
  private
44
44
 
45
- # Original require method
45
+ attr_reader :original
46
+ private :original
46
47
  #
47
48
  # @return [Method]
48
- attr_reader :original
49
49
 
50
- # Run zombifier
51
- #
52
- # @return [undefined]
53
50
  def call
54
51
  @original = require_highjack.call(method(:require))
55
52
  require(root_require)
56
53
  end
57
54
 
58
- # Test if logical name is subjected to zombification
59
- #
60
- # @param [String]
61
55
  def include?(logical_name)
62
56
  !@zombified.include?(logical_name) && includes =~ logical_name
63
57
  end
64
58
 
65
- # Require file in zombie namespace
66
- #
67
- # @param [#to_s] logical_name
68
- #
69
- # @return [Bool]
70
- # true if successful and false if feature already loaded
71
59
  def require(logical_name)
72
60
  logical_name = logical_name.to_s
73
61
  loaded = original.call(logical_name)
@@ -77,14 +65,6 @@ module Mutant
77
65
  true
78
66
  end
79
67
 
80
- # Find file by logical path
81
- #
82
- # @param [String] logical_name
83
- #
84
- # @return [File]
85
- #
86
- # @raise [LoadError]
87
- # otherwise
88
68
  def find(logical_name)
89
69
  file_name = "#{logical_name}.rb"
90
70
 
@@ -96,13 +76,6 @@ module Mutant
96
76
  fail LoadError, "Cannot find file #{file_name.inspect} in load path"
97
77
  end
98
78
 
99
- # Zombify contents of file
100
- #
101
- # Probably the 2nd valid use of eval ever. (First one is inserting mutants!).
102
- #
103
- # @param [Pathname] source_path
104
- #
105
- # @return [undefined]
106
79
  def zombify(source_path)
107
80
  kernel.eval(
108
81
  Unparser.unparse(namespaced_node(source_path)),
@@ -111,11 +84,6 @@ module Mutant
111
84
  )
112
85
  end
113
86
 
114
- # Namespaced root node
115
- #
116
- # @param [Pathname] source_path
117
- #
118
- # @return [Parser::AST::Node]
119
87
  def namespaced_node(source_path)
120
88
  s(:module, s(:const, nil, namespace), Unparser.parse(source_path.read))
121
89
  end
@@ -7,8 +7,6 @@ Mutant::Meta::Example.add :and do
7
7
  mutation 'true'
8
8
  mutation 'false'
9
9
  mutation 'true or false'
10
- mutation 'true and nil'
11
- mutation 'nil and false'
12
10
  mutation 'false and false'
13
11
  mutation 'true and true'
14
12
  mutation '!true and false'
@@ -6,7 +6,6 @@ Mutant::Meta::Example.add :array do
6
6
  singleton_mutations
7
7
  mutation 'true'
8
8
  mutation '[false]'
9
- mutation '[nil]'
10
9
  mutation '[]'
11
10
  end
12
11
 
@@ -16,9 +15,7 @@ Mutant::Meta::Example.add :array do
16
15
  singleton_mutations
17
16
 
18
17
  # Mutation of each element in array
19
- mutation '[nil, false]'
20
18
  mutation '[false, false]'
21
- mutation '[true, nil]'
22
19
  mutation '[true, true]'
23
20
 
24
21
  # Remove each element of array once
@@ -6,8 +6,6 @@ Mutant::Meta::Example.add :begin do
6
6
  # Mutation of each statement in block
7
7
  mutation 'true; true'
8
8
  mutation 'false; false'
9
- mutation 'nil; false'
10
- mutation 'true; nil'
11
9
 
12
10
  # Delete each statement
13
11
  mutation 'true'
@@ -18,6 +16,5 @@ Mutant::Meta::Example.add :begin do
18
16
 
19
17
  source s(:begin, s(:true))
20
18
  # Mutation of each statement in block
21
- mutation s(:begin, s(:nil))
22
19
  mutation s(:begin, s(:false))
23
20
  end
@@ -108,7 +108,6 @@ Mutant::Meta::Example.add :block do
108
108
 
109
109
  singleton_mutations
110
110
  mutation 'foo { self << false }'
111
- mutation 'foo { self << nil }'
112
111
  mutation 'foo { nil << true }'
113
112
  mutation 'foo { nil }'
114
113
  mutation 'foo { self }'
@@ -134,7 +133,6 @@ Mutant::Meta::Example.add :block do
134
133
  mutation 'foo { break if true }'
135
134
  mutation 'foo { next if !true }'
136
135
  mutation 'foo { next if false }'
137
- mutation 'foo { next if nil }'
138
136
  mutation 'foo { next }'
139
137
  end
140
138
 
@@ -163,7 +161,6 @@ Mutant::Meta::Example.add :block do
163
161
  mutation 'foo { nil if true }'
164
162
  mutation 'foo { break if !true }'
165
163
  mutation 'foo { break if false }'
166
- mutation 'foo { break if nil }'
167
164
  mutation 'foo { break }'
168
165
  end
169
166
 
@@ -5,6 +5,5 @@ Mutant::Meta::Example.add :break do
5
5
 
6
6
  singleton_mutations
7
7
  mutation 'break false'
8
- mutation 'break nil'
9
8
  mutation 'break'
10
9
  end
@@ -23,12 +23,6 @@ Mutant::Meta::Example.add :case do
23
23
  else
24
24
  end
25
25
  RUBY
26
- mutation <<-RUBY
27
- case
28
- when nil
29
- else
30
- end
31
- RUBY
32
26
  end
33
27
 
34
28
  # rubocop:disable Metrics/BlockLength
@@ -5,7 +5,6 @@ Mutant::Meta::Example.add :casgn do
5
5
 
6
6
  mutation 'A__MUTANT__ = true'
7
7
  mutation 'A = false'
8
- mutation 'A = nil'
9
8
  mutation 'remove_const :A'
10
9
  end
11
10
 
@@ -14,7 +13,6 @@ Mutant::Meta::Example.add :casgn do
14
13
 
15
14
  mutation 'self::A__MUTANT__ = true'
16
15
  mutation 'self::A = false'
17
- mutation 'self::A = nil'
18
16
  mutation 'self.remove_const :A'
19
17
  end
20
18
 
@@ -24,5 +22,4 @@ Mutant::Meta::Example.add :casgn do
24
22
  singleton_mutations
25
23
  mutation 'A__MUTANT__ &&= true'
26
24
  mutation 'A &&= false'
27
- mutation 'A &&= nil'
28
25
  end
@@ -6,5 +6,4 @@ Mutant::Meta::Example.add :cvasgn do
6
6
  singleton_mutations
7
7
  mutation '@@a__mutant__ = true'
8
8
  mutation '@@a = false'
9
- mutation '@@a = nil'
10
9
  end
@@ -56,8 +56,6 @@ Mutant::Meta::Example.add :def do
56
56
  # Mutation of each statement in block
57
57
  mutation 'def foo; true; true; end'
58
58
  mutation 'def foo; false; false; end'
59
- mutation 'def foo; true; nil; end'
60
- mutation 'def foo; nil; false; end'
61
59
 
62
60
  # Remove statement in block
63
61
  mutation 'def foo; true; end'
@@ -97,7 +95,6 @@ Mutant::Meta::Example.add :def do
97
95
  mutation 'def foo(a, b = nil); end'
98
96
  mutation 'def foo; true; end'
99
97
  mutation 'def foo(a, b = nil); raise; end'
100
- mutation 'def foo(a, b = nil); nil; end'
101
98
  mutation 'def foo(a, b = nil); false; end'
102
99
  mutation 'def foo(a); true; end'
103
100
  mutation 'def foo(a, b = nil); b = nil; true; end'
@@ -118,7 +115,6 @@ end
118
115
  Mutant::Meta::Example.add :def do
119
116
  source 'def foo(_unused = true); end'
120
117
 
121
- mutation 'def foo(_unused = nil); end'
122
118
  mutation 'def foo(_unused = false); end'
123
119
  mutation 'def foo(_unused = true); raise; end'
124
120
  mutation 'def foo(_unused); end'
@@ -154,7 +150,6 @@ Mutant::Meta::Example.add :def do
154
150
  mutation 'def foo(a); end'
155
151
  mutation 'def foo(); end'
156
152
  mutation 'def foo(a = false); end'
157
- mutation 'def foo(a = nil); end'
158
153
  mutation 'def foo(_a = true); end'
159
154
  mutation 'def foo(a = true); raise; end'
160
155
  mutation 'def foo(a = true); a = true; end'
@@ -167,8 +162,6 @@ Mutant::Meta::Example.add :def do
167
162
  # Body presence mutation
168
163
  mutation 'def self.foo; false; false; end'
169
164
  mutation 'def self.foo; true; true; end'
170
- mutation 'def self.foo; true; nil; end'
171
- mutation 'def self.foo; nil; false; end'
172
165
 
173
166
  # Body presence mutation
174
167
  mutation 'def self.foo; true; end'
@@ -5,5 +5,4 @@ Mutant::Meta::Example.add :ensure do
5
5
 
6
6
  singleton_mutations
7
7
  mutation 'begin; rescue; ensure; false; end'
8
- mutation 'begin; rescue; ensure; nil; end'
9
8
  end
@@ -3,6 +3,5 @@
3
3
  Mutant::Meta::Example.add :false do
4
4
  source 'false'
5
5
 
6
- mutation 'nil'
7
6
  mutation 'true'
8
7
  end
@@ -6,5 +6,4 @@ Mutant::Meta::Example.add :gvasgn do
6
6
  singleton_mutations
7
7
  mutation '$a__mutant__ = true'
8
8
  mutation '$a = false'
9
- mutation '$a = nil'
10
9
  end
@@ -7,13 +7,9 @@ Mutant::Meta::Example.add :hash do
7
7
 
8
8
  # Mutation of each key and value in hash
9
9
  mutation '{ false => true , false => false }'
10
- mutation '{ nil => true , false => false }'
11
10
  mutation '{ true => false , false => false }'
12
- mutation '{ true => nil , false => false }'
13
11
  mutation '{ true => true , true => false }'
14
- mutation '{ true => true , nil => false }'
15
12
  mutation '{ true => true , false => true }'
16
- mutation '{ true => true , false => nil }'
17
13
 
18
14
  # Remove each key once
19
15
  mutation '{ true => true }'
data/meta/if.rb CHANGED
@@ -28,11 +28,9 @@ Mutant::Meta::Example.add :if do
28
28
 
29
29
  # mutation of if body
30
30
  mutation 'if condition; false; else false; end'
31
- mutation 'if condition; nil; else false; end'
32
31
 
33
32
  # mutation of else body
34
33
  mutation 'if condition; true; else true; end'
35
- mutation 'if condition; true; else nil; end'
36
34
  end
37
35
 
38
36
  Mutant::Meta::Example.add :if do
@@ -41,7 +39,6 @@ Mutant::Meta::Example.add :if do
41
39
  singleton_mutations
42
40
  mutation 'if !condition; true; end'
43
41
  mutation 'if condition; false; end'
44
- mutation 'if condition; nil; end'
45
42
  mutation 'if true; true; end'
46
43
  mutation 'if false; true; end'
47
44
  mutation 'if nil; true; end'
@@ -57,7 +54,6 @@ Mutant::Meta::Example.add :if do
57
54
  mutation 'unless true; true; end'
58
55
  mutation 'unless false; true; end'
59
56
  mutation 'unless condition; false; end'
60
- mutation 'unless condition; nil; end'
61
57
  mutation 'if condition; true; end'
62
58
  mutation 'true'
63
59
  end
@@ -68,7 +64,6 @@ Mutant::Meta::Example.add :if do
68
64
  singleton_mutations
69
65
  mutation 'false if /foo/'
70
66
  mutation 'true if //'
71
- mutation 'nil if /foo/'
72
67
  mutation 'true if true'
73
68
  mutation 'true if false'
74
69
  mutation 'true if nil'
@@ -6,7 +6,6 @@ Mutant::Meta::Example.add :ivasgn do
6
6
  singleton_mutations
7
7
  mutation '@a__mutant__ = true'
8
8
  mutation '@a = false'
9
- mutation '@a = nil'
10
9
  end
11
10
 
12
11
  Mutant::Meta::Example.add :ivasgn do
@@ -5,5 +5,4 @@ Mutant::Meta::Example.add :kwbegin do
5
5
 
6
6
  singleton_mutations
7
7
  mutation 'begin; false; end'
8
- mutation 'begin; nil; end'
9
8
  end
@@ -6,7 +6,6 @@ Mutant::Meta::Example.add :lvasgn do
6
6
  singleton_mutations
7
7
  mutation 'a__mutant__ = true'
8
8
  mutation 'a = false'
9
- mutation 'a = nil'
10
9
  end
11
10
 
12
11
  Mutant::Meta::Example.add :array, :lvasgn do
@@ -6,7 +6,6 @@ Mutant::Meta::Example.add :match_current_line do
6
6
  singleton_mutations
7
7
  mutation 'false if /foo/'
8
8
  mutation 'true if //'
9
- mutation 'nil if /foo/'
10
9
  mutation 'true if true'
11
10
  mutation 'true if false'
12
11
  mutation 'true if nil'
@@ -5,7 +5,6 @@ Mutant::Meta::Example.add :next do
5
5
 
6
6
  singleton_mutations
7
7
  mutation 'next false'
8
- mutation 'next nil'
9
8
  mutation 'next'
10
9
  mutation 'break true'
11
10
  end
data/meta/or.rb CHANGED
@@ -6,9 +6,7 @@ Mutant::Meta::Example.add :or do
6
6
  singleton_mutations
7
7
  mutation 'true'
8
8
  mutation 'false'
9
- mutation 'nil or false'
10
9
  mutation 'false or false'
11
- mutation 'true or nil'
12
10
  mutation 'true or true'
13
11
  mutation 'true and false'
14
12
  mutation '!true or false'
@@ -58,7 +58,6 @@ Mutant::Meta::Example.add :regexp do
58
58
 
59
59
  singleton_mutations
60
60
  mutation 'false if /foo/'
61
- mutation 'nil if /foo/'
62
61
  mutation 'true if true'
63
62
  mutation 'true if false'
64
63
  mutation 'true if nil'
@@ -8,7 +8,6 @@ Mutant::Meta::Example.add :rescue do
8
8
  mutation 'begin; rescue self, ExceptionB => error; true; end'
9
9
  mutation 'begin; rescue ExceptionA, self => error; true; end'
10
10
  mutation 'begin; rescue ExceptionA, ExceptionB => error; false; end'
11
- mutation 'begin; rescue ExceptionA, ExceptionB => error; nil; end'
12
11
  mutation 'begin; true; end'
13
12
 
14
13
  end
@@ -19,7 +18,6 @@ Mutant::Meta::Example.add :rescue do
19
18
  singleton_mutations
20
19
  mutation 'begin; rescue SomeException; true; end'
21
20
  mutation 'begin; rescue SomeException => error; false; end'
22
- mutation 'begin; rescue SomeException => error; nil; end'
23
21
  mutation 'begin; rescue self => error; true; end'
24
22
  mutation 'begin; true; end'
25
23
  end
@@ -29,7 +27,6 @@ Mutant::Meta::Example.add :rescue do
29
27
 
30
28
  singleton_mutations
31
29
  mutation 'begin; rescue => error; false; end'
32
- mutation 'begin; rescue => error; nil; end'
33
30
  mutation 'begin; rescue; true; end'
34
31
  mutation 'begin; true; end'
35
32
  end
@@ -39,7 +36,6 @@ Mutant::Meta::Example.add :rescue do
39
36
 
40
37
  singleton_mutations
41
38
  mutation 'begin; rescue; false; end'
42
- mutation 'begin; rescue; nil; end'
43
39
  mutation 'begin; true end'
44
40
  end
45
41
 
@@ -48,7 +44,6 @@ Mutant::Meta::Example.add :rescue do
48
44
 
49
45
  singleton_mutations
50
46
  mutation 'begin; false; end'
51
- mutation 'begin; nil; end'
52
47
  end
53
48
 
54
49
  Mutant::Meta::Example.add :rescue do
@@ -86,5 +81,4 @@ Mutant::Meta::Example.add :rescue do
86
81
 
87
82
  singleton_mutations
88
83
  mutation 'begin; rescue; ensure; false; end'
89
- mutation 'begin; rescue; ensure; nil; end'
90
84
  end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ Mutant::Meta::Example.add :sclass do
4
+ source 'class << self; bar; end'
5
+
6
+ mutation 'class << self; nil; end'
7
+ mutation 'class << self; self; end'
8
+ end
9
+
10
+ Mutant::Meta::Example.add :sclass do
11
+ source 'class << self; end'
12
+ end
@@ -5,7 +5,6 @@ Mutant::Meta::Example.add :send do
5
5
 
6
6
  singleton_mutations
7
7
  mutation 'a == b'
8
- mutation 'a >= b'
9
8
  mutation 'a.eql?(b)'
10
9
  mutation 'a.equal?(b)'
11
10
  mutation 'nil > b'
@@ -90,7 +89,6 @@ Mutant::Meta::Example.add :send do
90
89
 
91
90
  singleton_mutations
92
91
  mutation 'a == b'
93
- mutation 'a <= b'
94
92
  mutation 'a.eql?(b)'
95
93
  mutation 'a.equal?(b)'
96
94
  mutation 'nil < b'
@@ -488,9 +486,7 @@ end
488
486
  mutation 'true'
489
487
  mutation 'false'
490
488
  mutation "false #{operator} false"
491
- mutation "nil #{operator} false"
492
489
  mutation "true #{operator} true"
493
- mutation "true #{operator} nil"
494
490
  end
495
491
  end
496
492