mutant 0.9.1 → 0.9.2

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: adb6a3a1731a9c1d8939c6ed36cb5696196bd296c02de6a2d372c8d14b4c33be
4
- data.tar.gz: 8c5c7043e92cf944c5105c3d09bb8934a6038e8e575bf56aa437c93a867387f9
3
+ metadata.gz: 0b6a747b9980b4450831809ea2a799652f93dbd5be93ffe2a9ad25df314dddff
4
+ data.tar.gz: 2b72a0f6af97d24ab2191665e9be7d5975394348cc2b077d2f5efcb27fb38a89
5
5
  SHA512:
6
- metadata.gz: 79019875cbc30db995870efdfbed29c73aac0b0c5d428f4a4b5cb612ea9d0079ac9269bbf48c5dae810282eb5b7f73051d2fd47f960544d031b83f28688cf2dd
7
- data.tar.gz: 5ee2665f9aea90396fd9227c876b139f1a3c54e388b515d0d7ab7eddff3c9def8b4fca0b9b83f497379f5a3946d9351299672e23fdd29a714e36eda6c5faa392
6
+ metadata.gz: f104307508a7c296b1b69f245394d0eef7f1991669a35b603aa8e4c21f5d9c205f509de519ae314e450c9cd57a879807d9b1778d84c822902fdafe9c68f8731a
7
+ data.tar.gz: a57dd99f21bfc48fa3a40f2fae04c8005f32c5615bc4509d30fafbc6f047c29a27b3eafa5f1de6329b9cb1b822a5fa72ee8ff8c8957b4bb45727204daa4ff56f
@@ -1,3 +1,7 @@
1
+ # v0.9.2 2020-01-02
2
+
3
+ * Upgrade to parser ~> 2.6.5
4
+
1
5
  # v0.9.1 2020-01-02
2
6
 
3
7
  * Packaging bugfix.
data/Gemfile CHANGED
@@ -6,6 +6,8 @@ gemspec name: 'mutant'
6
6
 
7
7
  eval_gemfile File.expand_path('Gemfile.shared', __dir__)
8
8
 
9
+ gem 'unparser', git: 'https://github.com/mbj/unparser.git'
10
+
9
11
  gem(
10
12
  'devtools',
11
13
  git: 'https://github.com/mbj/devtools.git',
@@ -21,10 +21,23 @@ GIT
21
21
  yard (~> 0.9.16)
22
22
  yardstick (~> 0.9.9)
23
23
 
24
+ GIT
25
+ remote: https://github.com/mbj/unparser.git
26
+ revision: 157a5b3b43e9f1d540da74b1751dc2b6f7601c3b
27
+ specs:
28
+ unparser (0.4.6)
29
+ abstract_type (~> 0.0.7)
30
+ adamantium (~> 0.2.0)
31
+ concord (~> 0.1.5)
32
+ diff-lcs (~> 1.3)
33
+ equalizer (~> 0.0.9)
34
+ parser (~> 2.6.5)
35
+ procto (~> 0.0.2)
36
+
24
37
  PATH
25
38
  remote: .
26
39
  specs:
27
- mutant (0.9.0)
40
+ mutant (0.9.1)
28
41
  abstract_type (~> 0.0.7)
29
42
  adamantium (~> 0.2.0)
30
43
  anima (~> 0.3.1)
@@ -35,7 +48,7 @@ PATH
35
48
  ice_nine (~> 0.11.1)
36
49
  memoizable (~> 0.4.2)
37
50
  mutant-license (~> 0.1.0)
38
- parser (= 2.6.3)
51
+ parser (~> 2.6.5)
39
52
  procto (~> 0.0.2)
40
53
  unparser (~> 0.4.5)
41
54
 
@@ -86,7 +99,7 @@ GEM
86
99
  thread_safe (~> 0.3, >= 0.3.1)
87
100
  mutant-license (0.1.0)
88
101
  parallel (1.19.1)
89
- parser (2.6.3.0)
102
+ parser (2.6.5.0)
90
103
  ast (~> 2.4.0)
91
104
  path_expander (1.1.0)
92
105
  powerpack (0.1.2)
@@ -135,14 +148,6 @@ GEM
135
148
  simplecov-html (0.10.2)
136
149
  thread_safe (0.3.6)
137
150
  unicode-display_width (1.4.1)
138
- unparser (0.4.5)
139
- abstract_type (~> 0.0.7)
140
- adamantium (~> 0.2.0)
141
- concord (~> 0.1.5)
142
- diff-lcs (~> 1.3)
143
- equalizer (~> 0.0.9)
144
- parser (~> 2.6.3)
145
- procto (~> 0.0.2)
146
151
  virtus (1.0.5)
147
152
  axiom-types (~> 0.1)
148
153
  coercible (~> 1.0)
@@ -160,6 +165,7 @@ DEPENDENCIES
160
165
  mutant!
161
166
  mutant-license!
162
167
  parallel (~> 1.3)
168
+ unparser!
163
169
 
164
170
  BUNDLED WITH
165
171
  1.17.3
@@ -66,11 +66,8 @@ module Mutant
66
66
  # Nodes that are NOT generated by parser but used by mutant / unparser.
67
67
  GENERATED = Set.new(%i[empty]).freeze
68
68
 
69
- # Nodes missing from parser metadata
70
- MISSING = Set.new(%i[index indexasgn lambda procarg0]).freeze
71
-
72
69
  ALL = Set.new(
73
- (Parser::Meta::NODE_TYPES + GENERATED + MISSING) - BLACKLIST
70
+ (Parser::Meta::NODE_TYPES + GENERATED) - BLACKLIST
74
71
  ).freeze
75
72
  end # Types
76
73
  end # AST
@@ -8,6 +8,8 @@ module Mutant
8
8
 
9
9
  handle(:args)
10
10
 
11
+ PROCARG = %i[restarg mlhs].freeze
12
+
11
13
  private
12
14
 
13
15
  # Emit mutations
@@ -26,21 +28,12 @@ module Mutant
26
28
  emit_type
27
29
 
28
30
  Util::Array::Presence.call(children).each do |children|
29
- if children.one? && n_mlhs?(Mutant::Util.one(children))
30
- emit_procarg(Mutant::Util.one(children))
31
- else
31
+ unless children.one? && n_mlhs?(children.first)
32
32
  emit_type(*children)
33
33
  end
34
34
  end
35
35
  end
36
36
 
37
- # Emit procarg form
38
- #
39
- # @return [undefined]
40
- def emit_procarg(arg)
41
- emit_type(s(:procarg0, *arg))
42
- end
43
-
44
37
  # Emit argument mutations
45
38
  #
46
39
  # @return [undefined]
@@ -22,11 +22,15 @@ module Mutant
22
22
  for
23
23
  ident
24
24
  iflipflop
25
+ kwnilarg
25
26
  kwrestarg
26
27
  kwsplat
27
28
  match_with_lvasgn
28
29
  meth_ref
29
30
  module
31
+ numargs
32
+ numblock
33
+ numparam
30
34
  objc_kwarg
31
35
  objc_restarg
32
36
  objc_varargs
@@ -21,23 +21,9 @@ module Mutant
21
21
  #
22
22
  # @return [undefined]
23
23
  def dispatch
24
- __send__(MAP.fetch(argument.class))
25
- end
24
+ name = Mutant::Util.one(argument.children)
26
25
 
27
- # Emit argument symbol mutations
28
- #
29
- # @return [undefined]
30
- def emit_argument_symbol_mutations
31
- emit_type(:"_#{argument}") unless argument.to_s.start_with?('_')
32
- end
33
-
34
- # Emit argument node mutations
35
- #
36
- # @return [undefined]
37
- def emit_argument_node_mutations
38
- emit_argument_mutations
39
- first = Mutant::Util.one(argument.children)
40
- emit_type(first)
26
+ emit_type(s(:arg, :"_#{name}")) unless name.to_s.start_with?('_')
41
27
  end
42
28
  end # ProcargZero
43
29
  end # Node
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.9.1'
5
+ VERSION = '0.9.2'
6
6
  end # Mutant
@@ -38,7 +38,6 @@ Mutant::Meta::Example.add :block do
38
38
  mutation 'foo { |(a, b), c| raise }'
39
39
  mutation 'foo { |(a), c| }'
40
40
  mutation 'foo { |(b), c| }'
41
- mutation 'foo { |(a, b)| }'
42
41
  mutation 'foo { |c, | }'
43
42
  mutation 'foo { |(_a, b), c| }'
44
43
  mutation 'foo { |(a, _b), c| }'
@@ -81,13 +80,12 @@ Mutant::Meta::Example.add :block do
81
80
  end
82
81
 
83
82
  Mutant::Meta::Example.add :block do
84
- source 'foo { |(a)| }'
83
+ source 'foo { |a| }'
85
84
 
86
85
  singleton_mutations
87
86
  mutation 'foo { || }'
88
- mutation 'foo { |a| }'
89
- mutation 'foo { |(a)| raise }'
90
- mutation 'foo { |(_a)| }'
87
+ mutation 'foo { |a| raise }'
88
+ mutation 'foo { |_a| }'
91
89
  mutation 'foo'
92
90
  end
93
91
 
@@ -31,7 +31,7 @@ Gem::Specification.new do |gem|
31
31
  gem.add_runtime_dependency('ice_nine', '~> 0.11.1')
32
32
  gem.add_runtime_dependency('memoizable', '~> 0.4.2')
33
33
  gem.add_runtime_dependency('mutant-license', '~> 0.1.0')
34
- gem.add_runtime_dependency('parser', '= 2.6.3')
34
+ gem.add_runtime_dependency('parser', '~> 2.6.5')
35
35
  gem.add_runtime_dependency('procto', '~> 0.0.2')
36
36
  gem.add_runtime_dependency('unparser', '~> 0.4.5')
37
37
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
@@ -154,16 +154,16 @@ dependencies:
154
154
  name: parser
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '='
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 2.6.3
159
+ version: 2.6.5
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '='
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 2.6.3
166
+ version: 2.6.5
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: procto
169
169
  requirement: !ruby/object:Gem::Requirement