mutant 0.11.9 → 0.11.10
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.
- checksums.yaml +4 -4
- data/lib/mutant/mutator/node/regexp/named_group.rb +5 -5
- data/lib/mutant/parallel/driver.rb +18 -2
- data/lib/mutant/runner.rb +4 -0
- data/lib/mutant/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 163279d053e71f375fc6854b89e1ca0730d7de6a1cf883772097a635067fdc92
|
4
|
+
data.tar.gz: c943e8ad5544a90d967ac9c580557a1e41997de4a2363cffe829710f0a71c8ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a130b60a8e53fb84d6b95897bc2749007df58d114b8201ac409eb40f203ee9f90804df51f49083c345784d420335eaeaa884299e0c1d37634be6d72875b5580
|
7
|
+
data.tar.gz: 18845045b045a1692c5574c092f7035560cab6267a8bd2a904266a69919630df59a47e0cc0d6edfc32717c834824b1b8d698da979aa7480359d363c1df9f1c1f
|
@@ -8,25 +8,25 @@ module Mutant
|
|
8
8
|
class NamedGroup < Node
|
9
9
|
handle(:regexp_named_group)
|
10
10
|
|
11
|
-
children :name
|
11
|
+
children :name
|
12
12
|
|
13
13
|
private
|
14
14
|
|
15
15
|
def dispatch
|
16
|
-
return
|
16
|
+
return if remaining_children.empty?
|
17
17
|
|
18
|
-
|
18
|
+
remaining_children_indices.each(&method(:mutate_child))
|
19
19
|
|
20
20
|
# Allows unused captures to be kept and named if they are explicitly prefixed with an
|
21
21
|
# underscore, like we allow with unused local variables.
|
22
22
|
return if name_underscored?
|
23
23
|
|
24
|
-
emit(s(:regexp_passive_group,
|
24
|
+
emit(s(:regexp_passive_group, *remaining_children))
|
25
25
|
emit_name_underscore_mutation
|
26
26
|
end
|
27
27
|
|
28
28
|
def emit_name_underscore_mutation
|
29
|
-
emit_type("_#{name}",
|
29
|
+
emit_type("_#{name}", *remaining_children)
|
30
30
|
end
|
31
31
|
|
32
32
|
def name_underscored?
|
@@ -4,7 +4,7 @@ module Mutant
|
|
4
4
|
module Parallel
|
5
5
|
# Driver for parallelized execution
|
6
6
|
class Driver
|
7
|
-
include
|
7
|
+
include Anima.new(
|
8
8
|
:threads,
|
9
9
|
:var_active_jobs,
|
10
10
|
:var_final,
|
@@ -16,6 +16,11 @@ module Mutant
|
|
16
16
|
|
17
17
|
private(*anima.attribute_names)
|
18
18
|
|
19
|
+
def initialize(**attributes)
|
20
|
+
@alive = true
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
19
24
|
# Wait for computation to finish, with timeout
|
20
25
|
#
|
21
26
|
# @param [Float] timeout
|
@@ -23,11 +28,22 @@ module Mutant
|
|
23
28
|
# @return [Variable::Result<Sink#status>]
|
24
29
|
# current status
|
25
30
|
def wait_timeout(timeout)
|
26
|
-
var_final.take_timeout(timeout)
|
31
|
+
var_final.take_timeout(timeout) if @alive
|
27
32
|
|
28
33
|
finalize(status)
|
29
34
|
end
|
30
35
|
|
36
|
+
# Stop parallel computation
|
37
|
+
#
|
38
|
+
# This will cause all work to be immediately stopped.
|
39
|
+
#
|
40
|
+
# @return [self]
|
41
|
+
def stop
|
42
|
+
@alive = false
|
43
|
+
threads.each(&:kill)
|
44
|
+
self
|
45
|
+
end
|
46
|
+
|
31
47
|
private
|
32
48
|
|
33
49
|
def finalize(status)
|
data/lib/mutant/runner.rb
CHANGED
data/lib/mutant/version.rb
CHANGED
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.
|
4
|
+
version: 0.11.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Schirp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-05-
|
11
|
+
date: 2022-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diff-lcs
|