mutant 0.8.8 → 0.8.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +9 -0
  3. data/README.md +1 -1
  4. data/Rakefile +12 -8
  5. data/bin/mutant +5 -1
  6. data/config/flay.yml +1 -1
  7. data/lib/mutant.rb +18 -17
  8. data/lib/mutant/actor.rb +1 -7
  9. data/lib/mutant/actor/env.rb +0 -4
  10. data/lib/mutant/actor/mailbox.rb +0 -4
  11. data/lib/mutant/actor/receiver.rb +0 -4
  12. data/lib/mutant/actor/sender.rb +0 -2
  13. data/lib/mutant/ast.rb +1 -5
  14. data/lib/mutant/ast/meta/const.rb +0 -2
  15. data/lib/mutant/ast/meta/optarg.rb +0 -2
  16. data/lib/mutant/ast/meta/send.rb +0 -12
  17. data/lib/mutant/ast/named_children.rb +0 -10
  18. data/lib/mutant/ast/sexp.rb +1 -5
  19. data/lib/mutant/cli.rb +19 -38
  20. data/lib/mutant/color.rb +1 -7
  21. data/lib/mutant/config.rb +11 -7
  22. data/lib/mutant/context.rb +0 -4
  23. data/lib/mutant/context/scope.rb +0 -18
  24. data/lib/mutant/delegator.rb +0 -6
  25. data/lib/mutant/diff.rb +0 -18
  26. data/lib/mutant/env.rb +8 -24
  27. data/lib/mutant/env/bootstrap.rb +18 -41
  28. data/lib/mutant/expression.rb +0 -8
  29. data/lib/mutant/expression/method.rb +6 -7
  30. data/lib/mutant/expression/methods.rb +5 -9
  31. data/lib/mutant/expression/namespace.rb +0 -13
  32. data/lib/mutant/expression/parser.rb +0 -6
  33. data/lib/mutant/integration.rb +2 -20
  34. data/lib/mutant/isolation.rb +0 -4
  35. data/lib/mutant/loader.rb +20 -35
  36. data/lib/mutant/matcher.rb +1 -1
  37. data/lib/mutant/matcher/chain.rb +1 -3
  38. data/lib/mutant/matcher/compiler.rb +0 -8
  39. data/lib/mutant/matcher/config.rb +2 -10
  40. data/lib/mutant/matcher/filter.rb +1 -3
  41. data/lib/mutant/matcher/method.rb +4 -26
  42. data/lib/mutant/matcher/method/instance.rb +1 -7
  43. data/lib/mutant/matcher/method/singleton.rb +0 -12
  44. data/lib/mutant/matcher/methods.rb +1 -19
  45. data/lib/mutant/matcher/namespace.rb +1 -7
  46. data/lib/mutant/matcher/null.rb +1 -3
  47. data/lib/mutant/matcher/scope.rb +1 -5
  48. data/lib/mutant/matcher/static.rb +0 -2
  49. data/lib/mutant/meta.rb +0 -2
  50. data/lib/mutant/meta/example.rb +0 -28
  51. data/lib/mutant/meta/example/dsl.rb +2 -16
  52. data/lib/mutant/mutation.rb +9 -18
  53. data/lib/mutant/mutator.rb +0 -24
  54. data/lib/mutant/mutator/node.rb +1 -33
  55. data/lib/mutant/mutator/node/and_asgn.rb +0 -2
  56. data/lib/mutant/mutator/node/argument.rb +0 -10
  57. data/lib/mutant/mutator/node/arguments.rb +0 -12
  58. data/lib/mutant/mutator/node/begin.rb +0 -4
  59. data/lib/mutant/mutator/node/binary.rb +2 -11
  60. data/lib/mutant/mutator/node/block.rb +0 -6
  61. data/lib/mutant/mutator/node/break.rb +0 -2
  62. data/lib/mutant/mutator/node/case.rb +0 -6
  63. data/lib/mutant/mutator/node/conditional_loop.rb +0 -2
  64. data/lib/mutant/mutator/node/const.rb +1 -3
  65. data/lib/mutant/mutator/node/define.rb +4 -11
  66. data/lib/mutant/mutator/node/defined.rb +0 -2
  67. data/lib/mutant/mutator/node/dstr.rb +0 -2
  68. data/lib/mutant/mutator/node/dsym.rb +0 -2
  69. data/lib/mutant/mutator/node/generic.rb +1 -3
  70. data/lib/mutant/mutator/node/if.rb +0 -8
  71. data/lib/mutant/mutator/node/kwbegin.rb +0 -2
  72. data/lib/mutant/mutator/node/literal/array.rb +0 -4
  73. data/lib/mutant/mutator/node/literal/boolean.rb +0 -2
  74. data/lib/mutant/mutator/node/literal/fixnum.rb +0 -6
  75. data/lib/mutant/mutator/node/literal/float.rb +0 -6
  76. data/lib/mutant/mutator/node/literal/hash.rb +0 -6
  77. data/lib/mutant/mutator/node/literal/nil.rb +0 -2
  78. data/lib/mutant/mutator/node/literal/range.rb +0 -8
  79. data/lib/mutant/mutator/node/literal/regex.rb +0 -4
  80. data/lib/mutant/mutator/node/literal/string.rb +0 -2
  81. data/lib/mutant/mutator/node/literal/symbol.rb +0 -2
  82. data/lib/mutant/mutator/node/masgn.rb +0 -2
  83. data/lib/mutant/mutator/node/match_current_line.rb +0 -2
  84. data/lib/mutant/mutator/node/mlhs.rb +0 -2
  85. data/lib/mutant/mutator/node/named_value/access.rb +0 -8
  86. data/lib/mutant/mutator/node/named_value/constant_assignment.rb +1 -7
  87. data/lib/mutant/mutator/node/named_value/variable_assignment.rb +0 -4
  88. data/lib/mutant/mutator/node/next.rb +0 -2
  89. data/lib/mutant/mutator/node/noop.rb +0 -2
  90. data/lib/mutant/mutator/node/nthref.rb +0 -2
  91. data/lib/mutant/mutator/node/op_asgn.rb +0 -2
  92. data/lib/mutant/mutator/node/or_asgn.rb +0 -2
  93. data/lib/mutant/mutator/node/resbody.rb +0 -4
  94. data/lib/mutant/mutator/node/rescue.rb +0 -10
  95. data/lib/mutant/mutator/node/return.rb +0 -2
  96. data/lib/mutant/mutator/node/send.rb +4 -32
  97. data/lib/mutant/mutator/node/send/attribute_assignment.rb +0 -6
  98. data/lib/mutant/mutator/node/send/binary.rb +0 -6
  99. data/lib/mutant/mutator/node/send/index.rb +0 -6
  100. data/lib/mutant/mutator/node/splat.rb +0 -2
  101. data/lib/mutant/mutator/node/super.rb +0 -2
  102. data/lib/mutant/mutator/node/when.rb +0 -10
  103. data/lib/mutant/mutator/node/yield.rb +0 -2
  104. data/lib/mutant/mutator/node/zsuper.rb +0 -2
  105. data/lib/mutant/mutator/registry.rb +0 -6
  106. data/lib/mutant/mutator/util.rb +0 -4
  107. data/lib/mutant/mutator/util/array.rb +0 -6
  108. data/lib/mutant/mutator/util/symbol.rb +0 -2
  109. data/lib/mutant/parallel.rb +21 -17
  110. data/lib/mutant/parallel/master.rb +0 -28
  111. data/lib/mutant/parallel/source.rb +0 -10
  112. data/lib/mutant/parallel/worker.rb +15 -10
  113. data/lib/mutant/parser.rb +23 -0
  114. data/lib/mutant/reporter.rb +5 -8
  115. data/lib/mutant/reporter/cli.rb +1 -15
  116. data/lib/mutant/reporter/cli/format.rb +3 -25
  117. data/lib/mutant/reporter/cli/printer.rb +0 -18
  118. data/lib/mutant/reporter/cli/printer/config.rb +0 -2
  119. data/lib/mutant/reporter/cli/printer/env_progress.rb +0 -2
  120. data/lib/mutant/reporter/cli/printer/env_result.rb +0 -2
  121. data/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +0 -4
  122. data/lib/mutant/reporter/cli/printer/mutation_result.rb +0 -16
  123. data/lib/mutant/reporter/cli/printer/status.rb +0 -6
  124. data/lib/mutant/reporter/cli/printer/status_progressive.rb +0 -4
  125. data/lib/mutant/reporter/cli/printer/subject_progress.rb +0 -8
  126. data/lib/mutant/reporter/cli/printer/subject_result.rb +0 -2
  127. data/lib/mutant/reporter/cli/printer/test_result.rb +0 -2
  128. data/lib/mutant/reporter/cli/tput.rb +0 -4
  129. data/lib/mutant/repository.rb +4 -22
  130. data/lib/mutant/require_highjack.rb +0 -2
  131. data/lib/mutant/result.rb +23 -43
  132. data/lib/mutant/runner.rb +7 -20
  133. data/lib/mutant/runner/sink.rb +43 -86
  134. data/lib/mutant/selector.rb +0 -2
  135. data/lib/mutant/selector/expression.rb +0 -2
  136. data/lib/mutant/subject.rb +0 -22
  137. data/lib/mutant/subject/method.rb +2 -10
  138. data/lib/mutant/subject/method/instance.rb +0 -6
  139. data/lib/mutant/subject/method/singleton.rb +0 -2
  140. data/lib/mutant/test.rb +4 -3
  141. data/lib/mutant/version.rb +1 -1
  142. data/lib/mutant/warning_filter.rb +0 -10
  143. data/lib/mutant/zombifier.rb +5 -20
  144. data/meta/or_asgn.rb +6 -0
  145. data/meta/send.rb +29 -0
  146. data/mutant-rspec.gemspec +1 -1
  147. data/spec/integration/mutant/rspec_spec.rb +1 -1
  148. data/spec/integrations.yml +2 -3
  149. data/spec/shared/method_matcher_behavior.rb +7 -7
  150. data/spec/spec_helper.rb +2 -9
  151. data/spec/support/corpus.rb +37 -30
  152. data/spec/support/rb_bug.rb +1 -2
  153. data/spec/support/ruby_vm.rb +6 -3
  154. data/spec/support/shared_context.rb +19 -20
  155. data/spec/unit/mutant/actor/binding_spec.rb +6 -6
  156. data/spec/unit/mutant/actor/env_spec.rb +2 -2
  157. data/spec/unit/mutant/actor/mailbox_spec.rb +6 -6
  158. data/spec/unit/mutant/actor/message_spec.rb +2 -2
  159. data/spec/unit/mutant/actor/receiver_spec.rb +4 -4
  160. data/spec/unit/mutant/actor/sender_spec.rb +6 -6
  161. data/spec/unit/mutant/ast_spec.rb +9 -0
  162. data/spec/unit/mutant/cli_spec.rb +16 -10
  163. data/spec/unit/mutant/context/scope/root_spec.rb +1 -1
  164. data/spec/unit/mutant/context/scope/unqualified_name_spec.rb +1 -1
  165. data/spec/unit/mutant/context/scope_spec.rb +3 -3
  166. data/spec/unit/mutant/context_spec.rb +0 -22
  167. data/spec/unit/mutant/env/boostrap_spec.rb +34 -41
  168. data/spec/unit/mutant/env_spec.rb +74 -32
  169. data/spec/unit/mutant/integration/rspec_spec.rb +23 -17
  170. data/spec/unit/mutant/integration_spec.rb +4 -4
  171. data/spec/unit/mutant/isolation_spec.rb +4 -4
  172. data/spec/unit/mutant/loader_spec.rb +42 -0
  173. data/spec/unit/mutant/matcher/compiler_spec.rb +3 -3
  174. data/spec/unit/mutant/matcher/config_spec.rb +1 -1
  175. data/spec/unit/mutant/matcher/method/instance_spec.rb +8 -1
  176. data/spec/unit/mutant/matcher/method/singleton_spec.rb +8 -1
  177. data/spec/unit/mutant/matcher/namespace_spec.rb +7 -8
  178. data/spec/unit/mutant/matcher/null_spec.rb +3 -2
  179. data/spec/unit/mutant/mutation_spec.rb +11 -5
  180. data/spec/unit/mutant/mutator/registry_spec.rb +1 -1
  181. data/spec/unit/mutant/parallel/master_spec.rb +9 -9
  182. data/spec/unit/mutant/parallel/source/array_spec.rb +3 -3
  183. data/spec/unit/mutant/parallel/worker_spec.rb +5 -5
  184. data/spec/unit/mutant/parallel_spec.rb +4 -4
  185. data/spec/unit/mutant/parser_spec.rb +24 -0
  186. data/spec/unit/mutant/reporter/cli/printer_spec.rb +3 -3
  187. data/spec/unit/mutant/reporter/cli/tput_spec.rb +2 -2
  188. data/spec/unit/mutant/reporter/cli_spec.rb +7 -7
  189. data/spec/unit/mutant/reporter/null_spec.rb +5 -4
  190. data/spec/unit/mutant/repository/diff_spec.rb +30 -18
  191. data/spec/unit/mutant/repository/subject_filter_spec.rb +5 -5
  192. data/spec/unit/mutant/require_highjack_spec.rb +1 -1
  193. data/spec/unit/mutant/result/env_spec.rb +9 -9
  194. data/spec/unit/mutant/result/subject_spec.rb +5 -5
  195. data/spec/unit/mutant/runner/driver_spec.rb +4 -4
  196. data/spec/unit/mutant/runner/{sink/mutation_spec.rb → sink_spec.rb} +16 -4
  197. data/spec/unit/mutant/runner_spec.rb +31 -31
  198. data/spec/unit/mutant/selector/expression_spec.rb +8 -8
  199. data/spec/unit/mutant/subject/method/instance_spec.rb +9 -3
  200. data/spec/unit/mutant/subject/method/singleton_spec.rb +1 -1
  201. data/spec/unit/mutant/subject_spec.rb +1 -5
  202. data/spec/unit/mutant_spec.rb +3 -3
  203. metadata +9 -15
  204. data/config/mutant.yml +0 -14
  205. data/lib/mutant/cache.rb +0 -29
  206. data/lib/mutant/reporter/trace.rb +0 -36
  207. data/spec/support/rspec.rb +0 -21
  208. data/spec/unit/mutant/cache_spec.rb +0 -22
  209. data/spec/unit/mutant/loader/eval_spec.rb +0 -44
  210. data/spec/unit/mutant/reporter/trace_spec.rb +0 -21
  211. data/test_app/Gemfile.rspec3.2 +0 -7
@@ -15,8 +15,6 @@ module Mutant
15
15
  # Original regexp options
16
16
  #
17
17
  # @return [Parser::AST::Node]
18
- #
19
- # @api private
20
18
  def options
21
19
  children.last
22
20
  end
@@ -24,8 +22,6 @@ module Mutant
24
22
  # Emit mutants
25
23
  #
26
24
  # @return [undefined]
27
- #
28
- # @api private
29
25
  def dispatch
30
26
  emit_singletons unless parent_node && n_match_current_line?(parent_node)
31
27
  children.each_with_index do |child, index|
@@ -12,8 +12,6 @@ module Mutant
12
12
  # Emit mutants
13
13
  #
14
14
  # @return [undefined]
15
- #
16
- # @api private
17
15
  def dispatch
18
16
  emit_singletons
19
17
  end
@@ -16,8 +16,6 @@ module Mutant
16
16
  # Emit mutants
17
17
  #
18
18
  # @return [undefined]
19
- #
20
- # @api private
21
19
  def dispatch
22
20
  emit_singletons
23
21
  Mutator::Util::Symbol.each(value, self) do |value|
@@ -14,8 +14,6 @@ module Mutant
14
14
  # Perform dispatch
15
15
  #
16
16
  # @return [undefined]
17
- #
18
- # @api private
19
17
  def dispatch
20
18
  emit_singletons
21
19
  end
@@ -13,8 +13,6 @@ module Mutant
13
13
  # Emit mutants
14
14
  #
15
15
  # @return [undefined]
16
- #
17
- # @api private
18
16
  def dispatch
19
17
  emit_singletons
20
18
  emit_regexp_mutations
@@ -11,8 +11,6 @@ module Mutant
11
11
  # Emit mutations
12
12
  #
13
13
  # @return [undefined]
14
- #
15
- # @api private
16
14
  def dispatch
17
15
  children.each_index do |index|
18
16
  mutate_child(index)
@@ -13,8 +13,6 @@ module Mutant
13
13
  # Emit mutations
14
14
  #
15
15
  # @return [undefined]
16
- #
17
- # @api private
18
16
  def dispatch
19
17
  emit_singletons
20
18
  end
@@ -30,8 +28,6 @@ module Mutant
30
28
  # Emit mutations
31
29
  #
32
30
  # @return [undefined]
33
- #
34
- # @api private
35
31
  def dispatch
36
32
  emit_attribute_read
37
33
  super()
@@ -42,8 +38,6 @@ module Mutant
42
38
  # Emit instance variable as attribute send
43
39
  #
44
40
  # @return [undefined]
45
- #
46
- # @api private
47
41
  def emit_attribute_read
48
42
  emit(s(:send, nil, attribute_name))
49
43
  end
@@ -51,8 +45,6 @@ module Mutant
51
45
  # Variable name without leading '@'
52
46
  #
53
47
  # @return [Symbol]
54
- #
55
- # @api private
56
48
  def attribute_name
57
49
  name.slice(NAME_RANGE).to_sym
58
50
  end
@@ -15,19 +15,15 @@ module Mutant
15
15
  # Perform dispatch
16
16
  #
17
17
  # @return [undefined]
18
- #
19
- # @api private
20
18
  def dispatch
21
19
  mutate_name
22
- emit_value_mutations
20
+ emit_value_mutations if value
23
21
  emit_remove_const
24
22
  end
25
23
 
26
24
  # Emit remove_const
27
25
  #
28
26
  # @return [undefined]
29
- #
30
- # @api private
31
27
  def emit_remove_const
32
28
  emit(s(:send, cbase, :remove_const, s(:sym, name)))
33
29
  end
@@ -35,8 +31,6 @@ module Mutant
35
31
  # Emit name mutations
36
32
  #
37
33
  # @return [undefined]
38
- #
39
- # @api private
40
34
  def mutate_name
41
35
  Mutator::Util::Symbol.each(name, self) do |name|
42
36
  emit_name(name.upcase)
@@ -26,8 +26,6 @@ module Mutant
26
26
  # Perform dispatch
27
27
  #
28
28
  # @return [undefined]
29
- #
30
- # @api private
31
29
  def dispatch
32
30
  emit_singletons
33
31
  mutate_name
@@ -37,8 +35,6 @@ module Mutant
37
35
  # Emit name mutations
38
36
  #
39
37
  # @return [undefined]
40
- #
41
- # @api private
42
38
  def mutate_name
43
39
  prefix, regexp = MAP.fetch(node.type)
44
40
  stripped = name.to_s.sub(regexp, EMPTY_STRING)
@@ -12,8 +12,6 @@ module Mutant
12
12
  # Emit mutations
13
13
  #
14
14
  # @return [undefined]
15
- #
16
- # @api private
17
15
  def dispatch
18
16
  super
19
17
  emit_singletons
@@ -12,8 +12,6 @@ module Mutant
12
12
  # Emit mutations
13
13
  #
14
14
  # @return [undefined]
15
- #
16
- # @api private
17
15
  def dispatch
18
16
  # noop
19
17
  end
@@ -13,8 +13,6 @@ module Mutant
13
13
  # Perform dispatch
14
14
  #
15
15
  # @return [undefined]
16
- #
17
- # @api private
18
16
  def dispatch
19
17
  unless number.equal?(1)
20
18
  emit_number(number - 1)
@@ -14,8 +14,6 @@ module Mutant
14
14
  # Emit mutations
15
15
  #
16
16
  # @return [undefined]
17
- #
18
- # @api private
19
17
  def dispatch
20
18
  emit_singletons
21
19
  emit_left_mutations do |node|
@@ -14,8 +14,6 @@ module Mutant
14
14
  # Emit mutations
15
15
  #
16
16
  # @return [undefined]
17
- #
18
- # @api private
19
17
  def dispatch
20
18
  emit_singletons
21
19
  emit_right_mutations
@@ -13,8 +13,6 @@ module Mutant
13
13
  # Emit mutations
14
14
  #
15
15
  # @return [undefined]
16
- #
17
- # @api private
18
16
  def dispatch
19
17
  emit_assignment(nil)
20
18
  emit_body_mutations if body
@@ -24,8 +22,6 @@ module Mutant
24
22
  # Mutate captures
25
23
  #
26
24
  # @return [undefined]
27
- #
28
- # @api private
29
25
  def mutate_captures
30
26
  return unless captures
31
27
  Util::Array::Element.each(captures.children, self) do |matchers|
@@ -15,8 +15,6 @@ module Mutant
15
15
  # Emit mutations
16
16
  #
17
17
  # @return [undefined]
18
- #
19
- # @api private
20
18
  def dispatch
21
19
  mutate_body
22
20
  mutate_rescue_bodies
@@ -28,8 +26,6 @@ module Mutant
28
26
  # Mutate child by name
29
27
  #
30
28
  # @return [undefined]
31
- #
32
- # @api private
33
29
  def mutate_rescue_bodies
34
30
  children_indices(RESCUE_INDICES).each do |index|
35
31
  rescue_body = children.at(index)
@@ -45,8 +41,6 @@ module Mutant
45
41
  # @param [Parser::AST::Node] child
46
42
  #
47
43
  # @return [undefined]
48
- #
49
- # @api private
50
44
  def emit_concat(child)
51
45
  if body
52
46
  emit(s(:begin, body, child))
@@ -58,8 +52,6 @@ module Mutant
58
52
  # Emit body mutations
59
53
  #
60
54
  # @return [undefined]
61
- #
62
- # @api private
63
55
  def mutate_body
64
56
  return unless body
65
57
  emit_body_mutations
@@ -69,8 +61,6 @@ module Mutant
69
61
  # Emit else body mutations
70
62
  #
71
63
  # @return [undefined]
72
- #
73
- # @api private
74
64
  def mutate_else_body
75
65
  return unless else_body
76
66
  emit_else_body_mutations
@@ -13,8 +13,6 @@ module Mutant
13
13
  # Emit mutants
14
14
  #
15
15
  # @return [undefined]
16
- #
17
- # @api private
18
16
  def dispatch
19
17
  emit_singletons
20
18
  return unless value
@@ -26,8 +26,10 @@ module Mutant
26
26
  to_i: %i[to_int],
27
27
  to_a: %i[to_ary],
28
28
  to_h: %i[to_hash],
29
- at: %i[fetch],
30
- :[] => %i[at fetch],
29
+ at: %i[fetch key?],
30
+ fetch: %i[key?],
31
+ values_at: %i[fetch_values],
32
+ :[] => %i[at fetch key?],
31
33
  :== => %i[eql? equal?],
32
34
  :>= => %i[> == eql? equal?],
33
35
  :<= => %i[< == eql? equal?],
@@ -46,8 +48,6 @@ module Mutant
46
48
  # Perform dispatch
47
49
  #
48
50
  # @return [undefined]
49
- #
50
- # @api private
51
51
  def dispatch
52
52
  emit_singletons
53
53
  if meta.index_assignment?
@@ -60,8 +60,6 @@ module Mutant
60
60
  # Perform non index dispatch
61
61
  #
62
62
  # @return [undefined]
63
- #
64
- # @api private
65
63
  def non_index_dispatch
66
64
  if meta.binary_method_operator?
67
65
  run(Binary)
@@ -75,8 +73,6 @@ module Mutant
75
73
  # AST metadata for node
76
74
  #
77
75
  # @return [AST::Meta::Send]
78
- #
79
- # @api private
80
76
  def meta
81
77
  AST::Meta::Send.new(node)
82
78
  end
@@ -85,15 +81,11 @@ module Mutant
85
81
  # Arguments being send
86
82
  #
87
83
  # @return [Enumerable<Parser::AST::Node>]
88
- #
89
- # @api private
90
84
  alias_method :arguments, :remaining_children
91
85
 
92
86
  # Perform normal, non special case dispatch
93
87
  #
94
88
  # @return [undefined]
95
- #
96
- # @api private
97
89
  def normal_dispatch
98
90
  emit_naked_receiver
99
91
  emit_selector_replacement
@@ -107,8 +99,6 @@ module Mutant
107
99
  # Emit mutations which only correspond to one selector
108
100
  #
109
101
  # @return [undefined]
110
- #
111
- # @api private
112
102
  def emit_selector_specific_mutations
113
103
  emit_const_get_mutation
114
104
  emit_integer_mutation
@@ -117,8 +107,6 @@ module Mutant
117
107
  # Emit selector mutations specific to top level constants
118
108
  #
119
109
  # @return [undefined]
120
- #
121
- # @api private
122
110
  def emit_receiver_selector_mutations
123
111
  return unless meta.receiver_possible_top_level_const?
124
112
 
@@ -131,8 +119,6 @@ module Mutant
131
119
  # Emit mutation from `to_i` to `Integer(...)`
132
120
  #
133
121
  # @return [undefined]
134
- #
135
- # @api private
136
122
  def emit_integer_mutation
137
123
  return unless selector.equal?(:to_i)
138
124
 
@@ -142,8 +128,6 @@ module Mutant
142
128
  # Emit mutation from `const_get` to const literal
143
129
  #
144
130
  # @return [undefined]
145
- #
146
- # @api private
147
131
  def emit_const_get_mutation
148
132
  return unless selector.equal?(:const_get) && n_sym?(arguments.first)
149
133
 
@@ -153,8 +137,6 @@ module Mutant
153
137
  # Emit selector replacement
154
138
  #
155
139
  # @return [undefined]
156
- #
157
- # @api private
158
140
  def emit_selector_replacement
159
141
  SELECTOR_REPLACEMENTS.fetch(selector, EMPTY_ARRAY).each(&method(:emit_selector))
160
142
  end
@@ -162,8 +144,6 @@ module Mutant
162
144
  # Emit naked receiver mutation
163
145
  #
164
146
  # @return [undefined]
165
- #
166
- # @api private
167
147
  def emit_naked_receiver
168
148
  emit(receiver) if receiver && !NOT_ASSIGNABLE.include?(receiver.type)
169
149
  end
@@ -171,8 +151,6 @@ module Mutant
171
151
  # Mutate arguments
172
152
  #
173
153
  # @return [undefined]
174
- #
175
- # @api private
176
154
  def mutate_arguments
177
155
  emit_type(receiver, selector)
178
156
  remaining_children_with_index.each do |_node, index|
@@ -184,8 +162,6 @@ module Mutant
184
162
  # Emit argument propagation
185
163
  #
186
164
  # @return [undefined]
187
- #
188
- # @api private
189
165
  def emit_argument_propagation
190
166
  node = arguments.first
191
167
  emit(node) if arguments.one? && !NOT_STANDALONE.include?(node.type)
@@ -194,8 +170,6 @@ module Mutant
194
170
  # Emit receiver mutations
195
171
  #
196
172
  # @return [undefined]
197
- #
198
- # @api private
199
173
  def mutate_receiver
200
174
  return unless receiver
201
175
  emit_implicit_self
@@ -207,8 +181,6 @@ module Mutant
207
181
  # Emit implicit self mutation
208
182
  #
209
183
  # @return [undefined]
210
- #
211
- # @api private
212
184
  def emit_implicit_self
213
185
  emit_receiver(nil) if n_self?(receiver) && !(
214
186
  KEYWORDS.include?(selector) ||
@@ -10,8 +10,6 @@ module Mutant
10
10
  # Emit mutations
11
11
  #
12
12
  # @return [undefined]
13
- #
14
- # @api private
15
13
  def dispatch
16
14
  normal_dispatch
17
15
  emit_attribute_read
@@ -20,8 +18,6 @@ module Mutant
20
18
  # Mutate arguments
21
19
  #
22
20
  # @return [undefined]
23
- #
24
- # @api private
25
21
  def mutate_arguments
26
22
  remaining_children_indices.each do |index|
27
23
  mutate_child(index)
@@ -31,8 +27,6 @@ module Mutant
31
27
  # Emit attribute read
32
28
  #
33
29
  # @return [undefined]
34
- #
35
- # @api private
36
30
  def emit_attribute_read
37
31
  emit_type(receiver, selector.to_s[0..-2].to_sym)
38
32
  end
@@ -13,8 +13,6 @@ module Mutant
13
13
  # Emit mutations
14
14
  #
15
15
  # @return [undefined]
16
- #
17
- # @api private
18
16
  def dispatch
19
17
  emit(left)
20
18
  emit_left_mutations
@@ -27,8 +25,6 @@ module Mutant
27
25
  # Emit mutations for `!=`
28
26
  #
29
27
  # @return [undefined]
30
- #
31
- # @api private
32
28
  def emit_not_equality_mutations
33
29
  return unless operator.equal?(:'!=')
34
30
 
@@ -41,8 +37,6 @@ module Mutant
41
37
  # @param new_operator [Symbol] selector to be negated
42
38
  #
43
39
  # @return [undefined]
44
- #
45
- # @api private
46
40
  def emit_not_equality_mutation(new_operator)
47
41
  emit(n_not(s(:send, left, new_operator, right)))
48
42
  end