mutant 0.11.22 → 0.11.23

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: bf5fb7800ce81d8fa90585c0dbd00ef9e2f2d21fa1ffbb788cbb59bb9323f677
4
- data.tar.gz: 206c2db89f0cfca28b088059a68b0715974dffee6062a8825dd27c703ecbb245
3
+ metadata.gz: fa07ddf4b4373385631a41ea909149b416a97eaeaa51c0f259d846fbf5488c24
4
+ data.tar.gz: ef900eed75c28e9ad08e21e2ed026dd4184808125ed5338c36e421659c388ff1
5
5
  SHA512:
6
- metadata.gz: 3923e0d8c6927da2c7f6ca9915fd84c98e032708bb41b9c10c91cca92503226a1d04d09b20970ffad44b06e0ca7ff20215609d385f927ea0880a8b60bafcad93
7
- data.tar.gz: 43834f9ec8af1dd4a65b307cf43af4acaffcb839c3c76fe52069dedb2201d80c7a81e313c6e4742fd9d28f81229f36f72bbfb5f4a7c119d13a001705648993b8
6
+ metadata.gz: e5a6f9a778791413e93f0b9d427d3636e4cbfba89581f1b196a03fa2bd528935550405da4a02e281a72476fac6dbd8a5a11ad101e484989051de36305fea3a63
7
+ data.tar.gz: 256ba65540c021c9855248dfe4aeff4a230e2cd4119119b4e46ff5f82c1c1eac540d8a4e2f9b1345be9f2b81d171ecfbae5a11ae03d1139643522dd190c0e77c
@@ -25,18 +25,22 @@ module Mutant
25
25
  children.each_with_index do |removed, index|
26
26
  new_arguments = children.dup
27
27
  new_arguments.delete_at(index)
28
- unless n_forward_arg?(removed) || removed_block_arg?(new_arguments) || only_mlhs?(new_arguments)
28
+ unless forward_type?(removed) || removed_block_arg?(new_arguments) || only_mlhs?(new_arguments)
29
29
  emit_type(*new_arguments)
30
30
  end
31
31
  end
32
32
  end
33
33
 
34
+ def forward_type?(removed)
35
+ n_forward_arg?(removed) || n_restarg?(removed) || n_kwrestarg?(removed)
36
+ end
37
+
34
38
  def only_mlhs?(new_arguments)
35
39
  new_arguments.one? && n_mlhs?(new_arguments.first)
36
40
  end
37
41
 
38
42
  def forward_arg?
39
- children.last && n_forward_arg?(children.last)
43
+ children.any?(&method(:forward_type?))
40
44
  end
41
45
 
42
46
  def removed_block_arg?(new_arguments)
@@ -54,7 +54,7 @@ module Mutant
54
54
  end
55
55
 
56
56
  def valid_send_mutation?(node)
57
- return unless n_send?(node)
57
+ return false unless n_send?(node)
58
58
 
59
59
  last = AST::Meta::Send.new(node: node).arguments.last
60
60
 
@@ -223,7 +223,7 @@ module Mutant
223
223
 
224
224
  argument = Mutant::Util.one(arguments)
225
225
 
226
- return if n_kwargs?(argument) || n_forwarded_args?(argument)
226
+ return if n_kwargs?(argument) || n_forwarded_args?(argument) || n_forwarded_restarg?(argument)
227
227
 
228
228
  emit_propagation(argument)
229
229
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.11.22'
5
+ VERSION = '0.11.23'
6
6
  end # Mutant
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.22
4
+ version: 0.11.23
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-07-17 00:00:00.000000000 Z
11
+ date: 2023-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -31,6 +31,9 @@ dependencies:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.2.2
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 3.2.2.4
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +41,9 @@ dependencies:
38
41
  - - "~>"
39
42
  - !ruby/object:Gem::Version
40
43
  version: 3.2.2
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 3.2.2.4
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: regexp_parser
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +78,14 @@ dependencies:
72
78
  requirements:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: 0.6.8
81
+ version: 0.6.9
76
82
  type: :runtime
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: 0.6.8
88
+ version: 0.6.9
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: parallel
85
91
  requirement: !ruby/object:Gem::Requirement