mutant 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +7 -0
  3. data/config/flay.yml +1 -1
  4. data/config/reek.yml +1 -0
  5. data/lib/mutant.rb +10 -3
  6. data/lib/mutant/actor.rb +2 -5
  7. data/lib/mutant/actor/env.rb +1 -3
  8. data/lib/mutant/actor/mailbox.rb +2 -4
  9. data/lib/mutant/actor/receiver.rb +0 -2
  10. data/lib/mutant/actor/sender.rb +0 -1
  11. data/lib/mutant/ast.rb +22 -28
  12. data/lib/mutant/ast/meta.rb +8 -88
  13. data/lib/mutant/ast/named_children.rb +1 -8
  14. data/lib/mutant/ast/sexp.rb +0 -2
  15. data/lib/mutant/cache.rb +1 -3
  16. data/lib/mutant/cli.rb +9 -19
  17. data/lib/mutant/color.rb +0 -3
  18. data/lib/mutant/config.rb +6 -2
  19. data/lib/mutant/context.rb +2 -4
  20. data/lib/mutant/context/scope.rb +10 -16
  21. data/lib/mutant/delegator.rb +0 -3
  22. data/lib/mutant/diff.rb +8 -17
  23. data/lib/mutant/env.rb +3 -5
  24. data/lib/mutant/env/bootstrap.rb +32 -39
  25. data/lib/mutant/expression.rb +14 -132
  26. data/lib/mutant/expression/method.rb +25 -42
  27. data/lib/mutant/expression/methods.rb +17 -29
  28. data/lib/mutant/expression/namespace.rb +33 -28
  29. data/lib/mutant/expression/parser.rb +71 -0
  30. data/lib/mutant/integration.rb +17 -16
  31. data/lib/mutant/isolation.rb +14 -14
  32. data/lib/mutant/loader.rb +2 -4
  33. data/lib/mutant/matcher.rb +1 -11
  34. data/lib/mutant/matcher/chain.rb +0 -1
  35. data/lib/mutant/matcher/compiler.rb +19 -52
  36. data/lib/mutant/matcher/config.rb +65 -5
  37. data/lib/mutant/matcher/filter.rb +11 -1
  38. data/lib/mutant/matcher/method.rb +11 -21
  39. data/lib/mutant/matcher/method/instance.rb +2 -16
  40. data/lib/mutant/matcher/method/singleton.rb +3 -20
  41. data/lib/mutant/matcher/methods.rb +11 -21
  42. data/lib/mutant/matcher/namespace.rb +0 -4
  43. data/lib/mutant/matcher/null.rb +0 -1
  44. data/lib/mutant/matcher/scope.rb +0 -12
  45. data/lib/mutant/meta.rb +0 -1
  46. data/lib/mutant/meta/example.rb +12 -26
  47. data/lib/mutant/meta/example/dsl.rb +1 -8
  48. data/lib/mutant/mutation.rb +6 -14
  49. data/lib/mutant/mutator.rb +2 -14
  50. data/lib/mutant/mutator/node.rb +6 -33
  51. data/lib/mutant/mutator/node/and_asgn.rb +0 -1
  52. data/lib/mutant/mutator/node/argument.rb +0 -5
  53. data/lib/mutant/mutator/node/arguments.rb +1 -7
  54. data/lib/mutant/mutator/node/begin.rb +0 -2
  55. data/lib/mutant/mutator/node/binary.rb +0 -3
  56. data/lib/mutant/mutator/node/block.rb +0 -2
  57. data/lib/mutant/mutator/node/break.rb +0 -1
  58. data/lib/mutant/mutator/node/case.rb +0 -3
  59. data/lib/mutant/mutator/node/conditional_loop.rb +0 -1
  60. data/lib/mutant/mutator/node/const.rb +0 -1
  61. data/lib/mutant/mutator/node/define.rb +0 -1
  62. data/lib/mutant/mutator/node/defined.rb +0 -1
  63. data/lib/mutant/mutator/node/dstr.rb +0 -1
  64. data/lib/mutant/mutator/node/dsym.rb +0 -1
  65. data/lib/mutant/mutator/node/generic.rb +0 -1
  66. data/lib/mutant/mutator/node/if.rb +0 -4
  67. data/lib/mutant/mutator/node/kwbegin.rb +0 -1
  68. data/lib/mutant/mutator/node/literal/array.rb +0 -2
  69. data/lib/mutant/mutator/node/literal/boolean.rb +0 -1
  70. data/lib/mutant/mutator/node/literal/fixnum.rb +2 -5
  71. data/lib/mutant/mutator/node/literal/float.rb +1 -4
  72. data/lib/mutant/mutator/node/literal/hash.rb +0 -3
  73. data/lib/mutant/mutator/node/literal/nil.rb +0 -1
  74. data/lib/mutant/mutator/node/literal/range.rb +1 -5
  75. data/lib/mutant/mutator/node/literal/regex.rb +1 -3
  76. data/lib/mutant/mutator/node/literal/string.rb +0 -1
  77. data/lib/mutant/mutator/node/literal/symbol.rb +0 -1
  78. data/lib/mutant/mutator/node/masgn.rb +0 -1
  79. data/lib/mutant/mutator/node/match_current_line.rb +0 -1
  80. data/lib/mutant/mutator/node/mlhs.rb +0 -1
  81. data/lib/mutant/mutator/node/named_value/access.rb +0 -1
  82. data/lib/mutant/mutator/node/named_value/constant_assignment.rb +0 -2
  83. data/lib/mutant/mutator/node/named_value/variable_assignment.rb +0 -2
  84. data/lib/mutant/mutator/node/next.rb +0 -1
  85. data/lib/mutant/mutator/node/noop.rb +0 -1
  86. data/lib/mutant/mutator/node/nthref.rb +0 -1
  87. data/lib/mutant/mutator/node/op_asgn.rb +0 -1
  88. data/lib/mutant/mutator/node/or_asgn.rb +1 -2
  89. data/lib/mutant/mutator/node/resbody.rb +0 -2
  90. data/lib/mutant/mutator/node/rescue.rb +1 -6
  91. data/lib/mutant/mutator/node/return.rb +0 -1
  92. data/lib/mutant/mutator/node/send.rb +16 -17
  93. data/lib/mutant/mutator/node/send/attribute_assignment.rb +0 -3
  94. data/lib/mutant/mutator/node/send/binary.rb +0 -1
  95. data/lib/mutant/mutator/node/send/index.rb +0 -3
  96. data/lib/mutant/mutator/node/splat.rb +0 -1
  97. data/lib/mutant/mutator/node/super.rb +0 -1
  98. data/lib/mutant/mutator/node/when.rb +2 -7
  99. data/lib/mutant/mutator/node/yield.rb +0 -1
  100. data/lib/mutant/mutator/node/zsuper.rb +0 -1
  101. data/lib/mutant/mutator/registry.rb +1 -4
  102. data/lib/mutant/mutator/util.rb +0 -2
  103. data/lib/mutant/mutator/util/array.rb +0 -3
  104. data/lib/mutant/mutator/util/symbol.rb +0 -1
  105. data/lib/mutant/parallel.rb +3 -9
  106. data/lib/mutant/parallel/master.rb +7 -17
  107. data/lib/mutant/parallel/source.rb +2 -7
  108. data/lib/mutant/parallel/worker.rb +1 -5
  109. data/lib/mutant/reporter.rb +0 -4
  110. data/lib/mutant/reporter/cli.rb +1 -8
  111. data/lib/mutant/reporter/cli/format.rb +7 -18
  112. data/lib/mutant/reporter/cli/printer.rb +2 -12
  113. data/lib/mutant/reporter/cli/printer/config.rb +1 -4
  114. data/lib/mutant/reporter/cli/printer/env_progress.rb +3 -7
  115. data/lib/mutant/reporter/cli/printer/env_result.rb +0 -1
  116. data/lib/mutant/reporter/cli/printer/mutation_progress_result.rb +0 -2
  117. data/lib/mutant/reporter/cli/printer/mutation_result.rb +3 -11
  118. data/lib/mutant/reporter/cli/printer/status.rb +1 -4
  119. data/lib/mutant/reporter/cli/printer/status_progressive.rb +1 -3
  120. data/lib/mutant/reporter/cli/printer/subject_progress.rb +0 -5
  121. data/lib/mutant/reporter/cli/printer/subject_result.rb +0 -1
  122. data/lib/mutant/reporter/cli/printer/test_result.rb +0 -1
  123. data/lib/mutant/reporter/cli/tput.rb +4 -1
  124. data/lib/mutant/reporter/trace.rb +2 -4
  125. data/lib/mutant/repository.rb +88 -0
  126. data/lib/mutant/require_highjack.rb +0 -1
  127. data/lib/mutant/result.rb +25 -48
  128. data/lib/mutant/runner.rb +7 -16
  129. data/lib/mutant/runner/sink.rb +3 -11
  130. data/lib/mutant/selector.rb +1 -2
  131. data/lib/mutant/selector/expression.rb +1 -2
  132. data/lib/mutant/subject.rb +10 -21
  133. data/lib/mutant/subject/method.rb +11 -12
  134. data/lib/mutant/subject/method/instance.rb +1 -5
  135. data/lib/mutant/subject/method/singleton.rb +1 -3
  136. data/lib/mutant/test.rb +1 -2
  137. data/lib/mutant/version.rb +2 -2
  138. data/lib/mutant/warning_filter.rb +2 -7
  139. data/lib/mutant/zombifier.rb +6 -10
  140. data/meta/send.rb +8 -0
  141. data/spec/spec_helper.rb +5 -1
  142. data/spec/support/corpus.rb +5 -9
  143. data/spec/support/rb_bug.rb +0 -1
  144. data/spec/support/rspec.rb +0 -1
  145. data/spec/support/ruby_vm.rb +0 -2
  146. data/spec/unit/mutant/ast/meta/send_spec.rb +42 -0
  147. data/spec/unit/mutant/ast/named_children_spec.rb +51 -0
  148. data/spec/unit/mutant/ast/sexp_spec.rb +36 -0
  149. data/spec/unit/mutant/ast_spec.rb +8 -0
  150. data/spec/unit/mutant/cli_spec.rb +34 -19
  151. data/spec/unit/mutant/context/scope_spec.rb +11 -0
  152. data/spec/unit/mutant/env/boostrap_spec.rb +5 -2
  153. data/spec/unit/mutant/env_spec.rb +14 -15
  154. data/spec/unit/mutant/expression/method_spec.rb +10 -14
  155. data/spec/unit/mutant/expression/methods_spec.rb +24 -11
  156. data/spec/unit/mutant/expression/namespace/flat_spec.rb +5 -6
  157. data/spec/unit/mutant/expression/namespace/recursive_spec.rb +16 -10
  158. data/spec/unit/mutant/expression/parser_spec.rb +67 -0
  159. data/spec/unit/mutant/expression_spec.rb +24 -57
  160. data/spec/unit/mutant/integration/rspec_spec.rb +7 -7
  161. data/spec/unit/mutant/integration_spec.rb +2 -2
  162. data/spec/unit/mutant/isolation_spec.rb +31 -29
  163. data/spec/unit/mutant/matcher/compiler/subject_prefix_spec.rb +2 -2
  164. data/spec/unit/mutant/matcher/compiler_spec.rb +27 -58
  165. data/spec/unit/mutant/matcher/config_spec.rb +45 -0
  166. data/spec/unit/mutant/matcher/filter_spec.rb +12 -5
  167. data/spec/unit/mutant/matcher/method/instance_spec.rb +0 -1
  168. data/spec/unit/mutant/matcher/method/singleton_spec.rb +0 -1
  169. data/spec/unit/mutant/matcher/namespace_spec.rb +4 -4
  170. data/spec/unit/mutant/parallel/worker_spec.rb +1 -1
  171. data/spec/unit/mutant/reporter/cli/printer/config_spec.rb +4 -4
  172. data/spec/unit/mutant/reporter/cli/printer/env_progress_spec.rb +7 -7
  173. data/spec/unit/mutant/reporter/cli/printer/env_result_spec.rb +2 -2
  174. data/spec/unit/mutant/reporter/cli/printer/status_progressive_spec.rb +2 -2
  175. data/spec/unit/mutant/reporter/cli/printer/status_spec.rb +12 -12
  176. data/spec/unit/mutant/reporter/cli/printer/subject_progress_spec.rb +1 -1
  177. data/spec/unit/mutant/reporter/cli_spec.rb +9 -10
  178. data/spec/unit/mutant/repository/diff_spec.rb +80 -0
  179. data/spec/unit/mutant/repository/subject_filter_spec.rb +28 -0
  180. data/spec/unit/mutant/result/env_spec.rb +1 -1
  181. data/spec/unit/mutant/runner_spec.rb +0 -1
  182. data/spec/unit/mutant/selector/expression_spec.rb +14 -14
  183. data/spec/unit/mutant/subject/method/instance_spec.rb +2 -2
  184. data/spec/unit/mutant/subject/method/singleton_spec.rb +2 -2
  185. data/spec/unit/mutant/subject_spec.rb +5 -2
  186. metadata +20 -3
  187. data/spec/support/mutation_verifier.rb +0 -96
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  emit_singletons unless parent_node && n_const?(parent_node)
20
19
  emit_type(nil, *children.drop(1))
@@ -11,7 +11,6 @@ module Mutant
11
11
  # @return [undefined]
12
12
  #
13
13
  # @api private
14
- #
15
14
  def dispatch
16
15
  emit_arguments_mutations
17
16
  emit_body(N_RAISE)
@@ -15,7 +15,6 @@ module Mutant
15
15
  # @return [undefined]
16
16
  #
17
17
  # @api private
18
- #
19
18
  def dispatch
20
19
  emit_expression_mutations do |node|
21
20
  !n_self?(node)
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  super
20
19
  emit_singletons
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  super
20
19
  emit_singletons
@@ -23,7 +23,6 @@ module Mutant
23
23
  # @return [undefined]
24
24
  #
25
25
  # @api private
26
- #
27
26
  def dispatch
28
27
  children.each_with_index do |child, index|
29
28
  mutate_child(index) if child.instance_of?(Parser::AST::Node)
@@ -15,7 +15,6 @@ module Mutant
15
15
  # @return [undefined]
16
16
  #
17
17
  # @api private
18
- #
19
18
  def dispatch
20
19
  emit_singletons
21
20
  mutate_condition
@@ -28,7 +27,6 @@ module Mutant
28
27
  # @return [undefined]
29
28
  #
30
29
  # @api private
31
- #
32
30
  def mutate_condition
33
31
  emit_condition_mutations do |node|
34
32
  !n_self?(node)
@@ -43,7 +41,6 @@ module Mutant
43
41
  # @return [undefined]
44
42
  #
45
43
  # @api private
46
- #
47
44
  def mutate_if_branch
48
45
  emit_type(condition, else_branch, nil) if else_branch
49
46
  return unless if_branch
@@ -57,7 +54,6 @@ module Mutant
57
54
  # @return [undefined]
58
55
  #
59
56
  # @api private
60
- #
61
57
  def mutate_else_branch
62
58
  return unless else_branch
63
59
  emit(else_branch)
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  super
20
19
  emit_singletons
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  emit_singletons
20
19
  emit_type
@@ -28,7 +27,6 @@ module Mutant
28
27
  # @return [undefined]
29
28
  #
30
29
  # @api private
31
- #
32
30
  def mutate_body
33
31
  children.each_index do |index|
34
32
  dup_children = children.dup
@@ -19,7 +19,6 @@ module Mutant
19
19
  # @return [undefined]
20
20
  #
21
21
  # @api private
22
- #
23
22
  def dispatch
24
23
  emit_nil
25
24
  emit(s(MAP.fetch(node.type)))
@@ -14,28 +14,25 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  emit_singletons
20
19
  emit_values(values)
21
20
  end
22
21
 
23
- # Return values to mutate against
22
+ # Values to mutate to
24
23
  #
25
24
  # @return [Array]
26
25
  #
27
26
  # @api private
28
- #
29
27
  def values
30
28
  [0, 1, -value, value + 1, value - 1]
31
29
  end
32
30
 
33
- # Return value
31
+ # Literal original value
34
32
  #
35
33
  # @return [Object]
36
34
  #
37
35
  # @api private
38
- #
39
36
  def value
40
37
  children.first
41
38
  end
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  emit_singletons
20
19
  emit_values(values)
@@ -32,17 +31,15 @@ module Mutant
32
31
  # @return [undefined]
33
32
  #
34
33
  # @api private
35
- #
36
34
  def emit_special_cases
37
35
  SPECIAL.each(&method(:emit))
38
36
  end
39
37
 
40
- # Return values to test against
38
+ # Values to mutate to
41
39
  #
42
40
  # @return [Array]
43
41
  #
44
42
  # @api private
45
- #
46
43
  def values
47
44
  original = children.first
48
45
  # Work around a bug in RBX/MRI or JRUBY:
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  emit_singletons
20
19
  emit_type
@@ -26,7 +25,6 @@ module Mutant
26
25
  # @return [undefined]
27
26
  #
28
27
  # @api private
29
- #
30
28
  def mutate_body
31
29
  children.each_index do |index|
32
30
  mutate_child(index)
@@ -50,7 +48,6 @@ module Mutant
50
48
  # @return [undefined]
51
49
  #
52
50
  # @api private
53
- #
54
51
  def dispatch
55
52
  emit_key_mutations
56
53
  emit_value_mutations
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  end
20
19
 
@@ -22,7 +22,6 @@ module Mutant
22
22
  # @return [undefined]
23
23
  #
24
24
  # @api private
25
- #
26
25
  def dispatch
27
26
  emit_singletons
28
27
  emit_inverse
@@ -30,12 +29,11 @@ module Mutant
30
29
  emit_upper_bound_mutations
31
30
  end
32
31
 
33
- # Return inverse node
32
+ # Inverse node
34
33
  #
35
34
  # @return [Parser::AST::Node]
36
35
  #
37
36
  # @api private
38
- #
39
37
  def emit_inverse
40
38
  emit(s(MAP.fetch(node.type), *children))
41
39
  end
@@ -45,7 +43,6 @@ module Mutant
45
43
  # @return [undefined]
46
44
  #
47
45
  # @api private
48
- #
49
46
  def emit_upper_bound_mutations
50
47
  emit__end_mutations
51
48
  emit_type(N_NAN, _end)
@@ -56,7 +53,6 @@ module Mutant
56
53
  # @return [undefined]
57
54
  #
58
55
  # @api private
59
- #
60
56
  def emit_lower_bound_mutations
61
57
  emit_start_mutations
62
58
  emit_type(start, N_INFINITY)
@@ -12,12 +12,11 @@ module Mutant
12
12
 
13
13
  private
14
14
 
15
- # Return options
15
+ # Original regexp options
16
16
  #
17
17
  # @return [Parser::AST::Node]
18
18
  #
19
19
  # @api private
20
- #
21
20
  def options
22
21
  children.last
23
22
  end
@@ -27,7 +26,6 @@ module Mutant
27
26
  # @return [undefined]
28
27
  #
29
28
  # @api private
30
- #
31
29
  def dispatch
32
30
  emit_singletons unless parent_node && n_match_current_line?(parent_node)
33
31
  children.each_with_index do |child, index|
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  emit_singletons
20
19
  end
@@ -18,7 +18,6 @@ module Mutant
18
18
  # @return [undefined]
19
19
  #
20
20
  # @api private
21
- #
22
21
  def dispatch
23
22
  emit_singletons
24
23
  Mutator::Util::Symbol.each(value, self) do |value|
@@ -16,7 +16,6 @@ module Mutant
16
16
  # @return [undefined]
17
17
  #
18
18
  # @api private
19
- #
20
19
  def dispatch
21
20
  emit_singletons
22
21
  end
@@ -15,7 +15,6 @@ module Mutant
15
15
  # @return [undefined]
16
16
  #
17
17
  # @api private
18
- #
19
18
  def dispatch
20
19
  emit_singletons
21
20
  emit_regexp_mutations
@@ -13,7 +13,6 @@ module Mutant
13
13
  # @return [undefined]
14
14
  #
15
15
  # @api private
16
- #
17
16
  def dispatch
18
17
  children.each_index do |index|
19
18
  mutate_child(index)
@@ -15,7 +15,6 @@ module Mutant
15
15
  # @return [undefined]
16
16
  #
17
17
  # @api private
18
- #
19
18
  def dispatch
20
19
  emit_singletons
21
20
  end
@@ -17,7 +17,6 @@ module Mutant
17
17
  # @return [undefined]
18
18
  #
19
19
  # @api private
20
- #
21
20
  def dispatch
22
21
  mutate_name
23
22
  emit_value_mutations if value
@@ -28,7 +27,6 @@ module Mutant
28
27
  # @return [undefined]
29
28
  #
30
29
  # @api private
31
- #
32
30
  def mutate_name
33
31
  Mutator::Util::Symbol.each(name, self) do |name|
34
32
  emit_name(name.upcase)
@@ -28,7 +28,6 @@ module Mutant
28
28
  # @return [undefined]
29
29
  #
30
30
  # @api private
31
- #
32
31
  def dispatch
33
32
  emit_singletons
34
33
  mutate_name
@@ -40,7 +39,6 @@ module Mutant
40
39
  # @return [undefined]
41
40
  #
42
41
  # @api private
43
- #
44
42
  def mutate_name
45
43
  prefix, regexp = MAP.fetch(node.type)
46
44
  stripped = name.to_s.sub(regexp, EMPTY_STRING)
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  super
20
19
  emit_singletons
@@ -14,7 +14,6 @@ module Mutant
14
14
  # @return [undefined]
15
15
  #
16
16
  # @api private
17
- #
18
17
  def dispatch
19
18
  # noop
20
19
  end
@@ -15,7 +15,6 @@ module Mutant
15
15
  # @return [undefined]
16
16
  #
17
17
  # @api private
18
- #
19
18
  def dispatch
20
19
  unless number.equal?(1)
21
20
  emit_number(number - 1)
@@ -16,7 +16,6 @@ module Mutant
16
16
  # @return [undefined]
17
17
  #
18
18
  # @api private
19
- #
20
19
  def dispatch
21
20
  emit_singletons
22
21
  emit_left_mutations do |node|
@@ -16,13 +16,12 @@ module Mutant
16
16
  # @return [undefined]
17
17
  #
18
18
  # @api private
19
- #
20
19
  def dispatch
21
20
  emit_singletons
22
21
  emit_right_mutations
23
22
  return if n_ivasgn?(left)
24
23
  emit_left_mutations do |node|
25
- AST::Meta.for(node).assignment?
24
+ AST::Types::ASSIGNABLE_VARIABLES.include?(node.type)
26
25
  end
27
26
  end
28
27
 
@@ -15,7 +15,6 @@ module Mutant
15
15
  # @return [undefined]
16
16
  #
17
17
  # @api private
18
- #
19
18
  def dispatch
20
19
  emit_assignment(nil)
21
20
  emit_body_mutations if body
@@ -27,7 +26,6 @@ module Mutant
27
26
  # @return [undefined]
28
27
  #
29
28
  # @api private
30
- #
31
29
  def mutate_captures
32
30
  return unless captures
33
31
  Util::Array::Element.each(captures.children, self) do |matchers|
@@ -17,7 +17,6 @@ module Mutant
17
17
  # @return [undefined]
18
18
  #
19
19
  # @api private
20
- #
21
20
  def dispatch
22
21
  mutate_body
23
22
  mutate_rescue_bodies
@@ -31,13 +30,12 @@ module Mutant
31
30
  # @return [undefined]
32
31
  #
33
32
  # @api private
34
- #
35
33
  def mutate_rescue_bodies
36
34
  children_indices(RESCUE_INDICES).each do |index|
37
35
  rescue_body = children.at(index)
38
36
  next unless rescue_body
39
37
  mutate_child(index)
40
- resbody_body = AST::Meta.for(rescue_body).body
38
+ resbody_body = AST::Meta::Resbody.new(rescue_body).body
41
39
  emit_concat(resbody_body) if resbody_body
42
40
  end
43
41
  end
@@ -49,7 +47,6 @@ module Mutant
49
47
  # @return [undefined]
50
48
  #
51
49
  # @api private
52
- #
53
50
  def emit_concat(child)
54
51
  if body
55
52
  emit(s(:begin, body, child))
@@ -63,7 +60,6 @@ module Mutant
63
60
  # @return [undefined]
64
61
  #
65
62
  # @api private
66
- #
67
63
  def mutate_body
68
64
  return unless body
69
65
  emit_body_mutations
@@ -75,7 +71,6 @@ module Mutant
75
71
  # @return [undefined]
76
72
  #
77
73
  # @api private
78
- #
79
74
  def mutate_else_body
80
75
  return unless else_body
81
76
  emit_else_body_mutations