mutant 0.10.25 → 0.10.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/mutant +1 -1
- data/lib/mutant.rb +15 -10
- data/lib/mutant/ast/find_metaclass_containing.rb +1 -1
- data/lib/mutant/ast/regexp.rb +17 -0
- data/lib/mutant/ast/regexp/transformer.rb +2 -2
- data/lib/mutant/ast/regexp/transformer/quantifier.rb +4 -2
- data/lib/mutant/bootstrap.rb +14 -6
- data/lib/mutant/cli/command.rb +4 -0
- data/lib/mutant/cli/command/environment/subject.rb +0 -4
- data/lib/mutant/cli/command/environment/test.rb +36 -0
- data/lib/mutant/cli/command/root.rb +1 -1
- data/lib/mutant/config.rb +18 -6
- data/lib/mutant/context.rb +1 -1
- data/lib/mutant/env.rb +6 -2
- data/lib/mutant/expression.rb +1 -1
- data/lib/mutant/expression/method.rb +4 -4
- data/lib/mutant/expression/methods.rb +5 -4
- data/lib/mutant/hooks.rb +77 -0
- data/lib/mutant/integration.rb +8 -2
- data/lib/mutant/isolation/exception.rb +22 -0
- data/lib/mutant/isolation/fork.rb +9 -12
- data/lib/mutant/matcher.rb +1 -1
- data/lib/mutant/matcher/config.rb +4 -3
- data/lib/mutant/matcher/method.rb +12 -10
- data/lib/mutant/matcher/method/instance.rb +6 -2
- data/lib/mutant/matcher/methods.rb +3 -5
- data/lib/mutant/meta/example.rb +1 -1
- data/lib/mutant/meta/example/dsl.rb +0 -1
- data/lib/mutant/meta/example/verification.rb +1 -1
- data/lib/mutant/mutation.rb +1 -1
- data/lib/mutant/mutator.rb +8 -1
- data/lib/mutant/mutator/node.rb +0 -5
- data/lib/mutant/mutator/node/argument.rb +2 -2
- data/lib/mutant/mutator/node/index.rb +1 -0
- data/lib/mutant/mutator/node/literal/float.rb +1 -3
- data/lib/mutant/mutator/node/literal/integer.rb +3 -6
- data/lib/mutant/mutator/node/literal/range.rb +1 -1
- data/lib/mutant/mutator/node/literal/regex.rb +3 -17
- data/lib/mutant/mutator/node/module.rb +19 -0
- data/lib/mutant/mutator/node/named_value/variable_assignment.rb +3 -3
- data/lib/mutant/mutator/node/regexp/character_type.rb +1 -1
- data/lib/mutant/mutator/node/regexp/named_group.rb +39 -0
- data/lib/mutant/mutator/node/regexp/zero_or_more.rb +2 -2
- data/lib/mutant/mutator/node/regopt.rb +1 -1
- data/lib/mutant/mutator/node/send.rb +63 -7
- data/lib/mutant/parallel.rb +2 -2
- data/lib/mutant/parallel/driver.rb +1 -1
- data/lib/mutant/parallel/worker.rb +4 -1
- data/lib/mutant/parser.rb +1 -1
- data/lib/mutant/pipe.rb +13 -1
- data/lib/mutant/procto.rb +23 -0
- data/lib/mutant/reporter/cli/printer.rb +10 -4
- data/lib/mutant/reporter/cli/printer/env.rb +2 -2
- data/lib/mutant/reporter/cli/printer/env_progress.rb +2 -2
- data/lib/mutant/reporter/cli/printer/isolation_result.rb +3 -1
- data/lib/mutant/repository/diff.rb +1 -1
- data/lib/mutant/selector.rb +1 -1
- data/lib/mutant/subject.rb +1 -1
- data/lib/mutant/subject/method/instance.rb +5 -42
- data/lib/mutant/transform.rb +1 -1
- data/lib/mutant/variable.rb +322 -0
- data/lib/mutant/version.rb +1 -1
- data/lib/mutant/world.rb +1 -1
- metadata +12 -159
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92495691b68b4f556972ce8ec9bc8db2a30acb78980f509b27f2d12d4883b1f6
|
4
|
+
data.tar.gz: b7e46f8a0e0544243aab53a9f873bc602ec52e83caa9de3e851e4415b8f15899
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7e49890adfcebdb4158d0e3d4afdc45589c49f1f66a4ecd700a7003dc3bf73acb967d6a51c1ea3c014edc1367ee1f5c79c4ebce8f5ca8c9dfac7f721649ad26
|
7
|
+
data.tar.gz: 644ec9e3cb8a5d768b52d709aaf86222fdf588822d139f008aaed3aadd2a9606b0524760e4cbec230d3ba17012374006febd1cbad1eab9839e4166560e3add51
|
data/bin/mutant
CHANGED
data/lib/mutant.rb
CHANGED
@@ -1,16 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'abstract_type'
|
4
|
-
require 'adamantium'
|
5
|
-
require 'anima'
|
6
|
-
require 'concord'
|
7
3
|
require 'diff/lcs'
|
8
4
|
require 'diff/lcs/hunk'
|
9
5
|
require 'digest/sha1'
|
10
|
-
require 'equalizer'
|
11
6
|
require 'etc'
|
12
|
-
require 'ice_nine'
|
13
|
-
require 'mprelude'
|
14
7
|
require 'json'
|
15
8
|
require 'open3'
|
16
9
|
require 'optparse'
|
@@ -22,7 +15,6 @@ require 'set'
|
|
22
15
|
require 'singleton'
|
23
16
|
require 'stringio'
|
24
17
|
require 'unparser'
|
25
|
-
require 'variable'
|
26
18
|
require 'yaml'
|
27
19
|
|
28
20
|
# This setting is done to make errors within the parallel
|
@@ -33,7 +25,12 @@ Thread.abort_on_exception = true
|
|
33
25
|
#
|
34
26
|
# @api private
|
35
27
|
module Mutant
|
36
|
-
|
28
|
+
AbstractType = Unparser::AbstractType
|
29
|
+
Adamantium = Unparser::Adamantium
|
30
|
+
Anima = Unparser::Anima
|
31
|
+
Concord = Unparser::Concord
|
32
|
+
Either = Unparser::Either
|
33
|
+
Equalizer = Unparser::Equalizer
|
37
34
|
|
38
35
|
EMPTY_STRING = ''
|
39
36
|
EMPTY_ARRAY = [].freeze
|
@@ -41,7 +38,9 @@ module Mutant
|
|
41
38
|
SCOPE_OPERATOR = '::'
|
42
39
|
end # Mutant
|
43
40
|
|
41
|
+
require 'mutant/procto'
|
44
42
|
require 'mutant/transform'
|
43
|
+
require 'mutant/variable'
|
45
44
|
require 'mutant/bootstrap'
|
46
45
|
require 'mutant/version'
|
47
46
|
require 'mutant/env'
|
@@ -72,8 +71,9 @@ require 'mutant/ast/meta/optarg'
|
|
72
71
|
require 'mutant/ast/meta/resbody'
|
73
72
|
require 'mutant/parser'
|
74
73
|
require 'mutant/isolation'
|
75
|
-
require 'mutant/isolation/
|
74
|
+
require 'mutant/isolation/exception'
|
76
75
|
require 'mutant/isolation/fork'
|
76
|
+
require 'mutant/isolation/none'
|
77
77
|
require 'mutant/parallel'
|
78
78
|
require 'mutant/parallel/driver'
|
79
79
|
require 'mutant/parallel/source'
|
@@ -90,6 +90,7 @@ require 'mutant/mutator/node/regexp'
|
|
90
90
|
require 'mutant/mutator/node/regexp/alternation_meta'
|
91
91
|
require 'mutant/mutator/node/regexp/beginning_of_line_anchor'
|
92
92
|
require 'mutant/mutator/node/regexp/capture_group'
|
93
|
+
require 'mutant/mutator/node/regexp/named_group'
|
93
94
|
require 'mutant/mutator/node/regexp/character_type'
|
94
95
|
require 'mutant/mutator/node/regexp/end_of_line_anchor'
|
95
96
|
require 'mutant/mutator/node/regexp/end_of_string_or_before_end_of_line_anchor'
|
@@ -137,6 +138,7 @@ require 'mutant/mutator/node/define'
|
|
137
138
|
require 'mutant/mutator/node/mlhs'
|
138
139
|
require 'mutant/mutator/node/nthref'
|
139
140
|
require 'mutant/mutator/node/masgn'
|
141
|
+
require 'mutant/mutator/node/module'
|
140
142
|
require 'mutant/mutator/node/return'
|
141
143
|
require 'mutant/mutator/node/block'
|
142
144
|
require 'mutant/mutator/node/block_pass'
|
@@ -184,6 +186,7 @@ require 'mutant/selector'
|
|
184
186
|
require 'mutant/selector/expression'
|
185
187
|
require 'mutant/selector/null'
|
186
188
|
require 'mutant/world'
|
189
|
+
require 'mutant/hooks'
|
187
190
|
require 'mutant/config'
|
188
191
|
require 'mutant/config/coverage_criteria'
|
189
192
|
require 'mutant/cli'
|
@@ -193,6 +196,7 @@ require 'mutant/cli/command/environment'
|
|
193
196
|
require 'mutant/cli/command/environment/run'
|
194
197
|
require 'mutant/cli/command/environment/show'
|
195
198
|
require 'mutant/cli/command/environment/subject'
|
199
|
+
require 'mutant/cli/command/environment/test'
|
196
200
|
require 'mutant/cli/command/root'
|
197
201
|
require 'mutant/runner'
|
198
202
|
require 'mutant/runner/sink'
|
@@ -254,6 +258,7 @@ module Mutant
|
|
254
258
|
Expression::Namespace::Recursive
|
255
259
|
]),
|
256
260
|
fail_fast: false,
|
261
|
+
hooks: EMPTY_ARRAY,
|
257
262
|
includes: EMPTY_ARRAY,
|
258
263
|
integration: nil,
|
259
264
|
isolation: Mutant::Isolation::Fork.new(WORLD),
|
@@ -10,7 +10,7 @@ module Mutant
|
|
10
10
|
# Descending into 'begin' nodes is supported because these are generated for
|
11
11
|
# the one-line syntax class << self; def foo; end
|
12
12
|
class FindMetaclassContaining
|
13
|
-
include NodePredicates, Concord.new(:root, :target), Procto
|
13
|
+
include NodePredicates, Concord.new(:root, :target), Procto
|
14
14
|
|
15
15
|
SCLASS_BODY_INDEX = 1
|
16
16
|
|
data/lib/mutant/ast/regexp.rb
CHANGED
@@ -32,6 +32,23 @@ module Mutant
|
|
32
32
|
def self.to_expression(node)
|
33
33
|
Transformer.lookup(node.type).to_expression(node)
|
34
34
|
end
|
35
|
+
|
36
|
+
# Convert's a `parser` `regexp` node into more fine-grained AST nodes.
|
37
|
+
#
|
38
|
+
# @param node [Parser::AST::Node]
|
39
|
+
#
|
40
|
+
# @return [Parser::AST::Node]
|
41
|
+
def self.expand_regexp_ast(node)
|
42
|
+
*body, _opts = node.children
|
43
|
+
|
44
|
+
# NOTE: We only mutate parts of regexp body if the body is composed of
|
45
|
+
# only strings. Regular expressions with interpolation are skipped
|
46
|
+
return unless body.all? { |child| child.type.equal?(:str) }
|
47
|
+
|
48
|
+
body_expression = parse(body.map(&:children).join)
|
49
|
+
|
50
|
+
to_ast(body_expression)
|
51
|
+
end
|
35
52
|
end # Regexp
|
36
53
|
end # AST
|
37
54
|
end # Mutant
|
@@ -49,7 +49,7 @@ module Mutant
|
|
49
49
|
class ExpressionToAST
|
50
50
|
PREFIX = :regexp
|
51
51
|
|
52
|
-
include Concord.new(:expression), Procto
|
52
|
+
include Concord.new(:expression), Procto, AST::Sexp, AbstractType, Adamantium
|
53
53
|
|
54
54
|
private
|
55
55
|
|
@@ -74,7 +74,7 @@ module Mutant
|
|
74
74
|
|
75
75
|
# Abstract node transformer
|
76
76
|
class ASTToExpression
|
77
|
-
include Concord.new(:node), Procto
|
77
|
+
include Concord.new(:node), Procto, AbstractType, Adamantium
|
78
78
|
|
79
79
|
# Call generic transform method and freeze result
|
80
80
|
#
|
@@ -30,7 +30,7 @@ module Mutant
|
|
30
30
|
|
31
31
|
Quantifier = Class.new.include(Concord::Public.new(:type, :suffix, :mode))
|
32
32
|
|
33
|
-
QUANTIFIER_MAP =
|
33
|
+
QUANTIFIER_MAP = {
|
34
34
|
regexp_greedy_zero_or_more: [:zero_or_more, '*', :greedy],
|
35
35
|
regexp_greedy_one_or_more: [:one_or_more, '+', :greedy],
|
36
36
|
regexp_greedy_zero_or_one: [:zero_or_one, '?', :greedy],
|
@@ -42,7 +42,9 @@ module Mutant
|
|
42
42
|
regexp_greedy_interval: [:interval, '', :greedy],
|
43
43
|
regexp_reluctant_interval: [:interval, '?', :reluctant],
|
44
44
|
regexp_possessive_interval: [:interval, '+', :possessive]
|
45
|
-
}.transform_values { |arguments| Quantifier.new(*arguments) }
|
45
|
+
}.transform_values { |arguments| Quantifier.new(*arguments) }
|
46
|
+
.to_h
|
47
|
+
.freeze
|
46
48
|
|
47
49
|
private
|
48
50
|
|
data/lib/mutant/bootstrap.rb
CHANGED
@@ -8,7 +8,7 @@ module Mutant
|
|
8
8
|
#
|
9
9
|
# env = config interpreted against the world
|
10
10
|
module Bootstrap
|
11
|
-
include Adamantium
|
11
|
+
include Adamantium, Anima.new(:config, :parser, :world)
|
12
12
|
|
13
13
|
SEMANTICS_MESSAGE_FORMAT =
|
14
14
|
"%<message>s. Fix your lib to follow normal ruby semantics!\n" \
|
@@ -31,8 +31,7 @@ module Mutant
|
|
31
31
|
#
|
32
32
|
# rubocop:disable Metrics/MethodLength
|
33
33
|
def self.call(world, config)
|
34
|
-
env = Env
|
35
|
-
.empty(world, config)
|
34
|
+
env = load_hooks(Env.empty(world, config))
|
36
35
|
.tap(&method(:infect))
|
37
36
|
.with(matchable_scopes: matchable_scopes(world, config))
|
38
37
|
|
@@ -49,6 +48,11 @@ module Mutant
|
|
49
48
|
end
|
50
49
|
# rubocop:enable Metrics/MethodLength
|
51
50
|
|
51
|
+
def self.load_hooks(env)
|
52
|
+
env.with(hooks: Hooks.load_config(env.config))
|
53
|
+
end
|
54
|
+
private_class_method :load_hooks
|
55
|
+
|
52
56
|
def self.start_subject(env, subjects)
|
53
57
|
start_expressions = env.config.matcher.start_expressions
|
54
58
|
|
@@ -63,10 +67,14 @@ module Mutant
|
|
63
67
|
private_class_method :start_subject
|
64
68
|
|
65
69
|
def self.infect(env)
|
66
|
-
config, world = env.config, env.world
|
70
|
+
config, hooks, world = env.config, env.hooks, env.world
|
71
|
+
|
72
|
+
hooks.run(:env_infection_pre, env)
|
73
|
+
|
74
|
+
config.includes.each(&world.load_path.public_method(:<<))
|
75
|
+
config.requires.each(&world.kernel.public_method(:require))
|
67
76
|
|
68
|
-
|
69
|
-
config.requires.each(&world.kernel.method(:require))
|
77
|
+
hooks.run(:env_infection_post, env)
|
70
78
|
end
|
71
79
|
private_class_method :infect
|
72
80
|
|
data/lib/mutant/cli/command.rb
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Mutant
|
4
|
+
module CLI
|
5
|
+
class Command
|
6
|
+
class Environment
|
7
|
+
class Test < self
|
8
|
+
NAME = 'test'
|
9
|
+
SHORT_DESCRIPTION = 'test subcommands'
|
10
|
+
|
11
|
+
class List < self
|
12
|
+
NAME = 'list'
|
13
|
+
SHORT_DESCRIPTION = 'List tests detected in the environment'
|
14
|
+
SUBCOMMANDS = EMPTY_ARRAY
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def action
|
19
|
+
bootstrap.fmap(&method(:list_tests))
|
20
|
+
end
|
21
|
+
|
22
|
+
def list_tests(env)
|
23
|
+
tests = env.integration.all_tests
|
24
|
+
print('Tests in environment: %d' % tests.length)
|
25
|
+
tests.each do |test|
|
26
|
+
print(test.identification)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
SUBCOMMANDS = [List].freeze
|
32
|
+
end # Test
|
33
|
+
end # Environment
|
34
|
+
end # Command
|
35
|
+
end # CLI
|
36
|
+
end # Mutant
|
data/lib/mutant/config.rb
CHANGED
@@ -6,10 +6,11 @@ module Mutant
|
|
6
6
|
# Does not reference any "external" volatile state. The configuration applied
|
7
7
|
# to current environment is being represented by the Mutant::Env object.
|
8
8
|
class Config
|
9
|
-
include Adamantium
|
9
|
+
include Adamantium, Anima.new(
|
10
10
|
:coverage_criteria,
|
11
11
|
:expression_parser,
|
12
12
|
:fail_fast,
|
13
|
+
:hooks,
|
13
14
|
:includes,
|
14
15
|
:integration,
|
15
16
|
:isolation,
|
@@ -49,11 +50,12 @@ module Mutant
|
|
49
50
|
other.with(
|
50
51
|
coverage_criteria: coverage_criteria.merge(other.coverage_criteria),
|
51
52
|
fail_fast: fail_fast || other.fail_fast,
|
53
|
+
hooks: hooks + other.hooks,
|
52
54
|
includes: includes + other.includes,
|
53
|
-
jobs: other.jobs || jobs,
|
54
55
|
integration: other.integration || integration,
|
55
|
-
|
56
|
+
jobs: other.jobs || jobs,
|
56
57
|
matcher: matcher.merge(other.matcher),
|
58
|
+
mutation_timeout: other.mutation_timeout || mutation_timeout,
|
57
59
|
requires: requires + other.requires,
|
58
60
|
zombie: zombie || other.zombie
|
59
61
|
)
|
@@ -106,20 +108,30 @@ module Mutant
|
|
106
108
|
DEFAULT.with(jobs: Etc.nprocessors)
|
107
109
|
end
|
108
110
|
|
111
|
+
PATHNAME_ARRAY = Transform::Array.new(
|
112
|
+
Transform::Sequence.new(
|
113
|
+
[
|
114
|
+
Transform::STRING,
|
115
|
+
Transform::Exception.new(ArgumentError, Pathname.public_method(:new))
|
116
|
+
]
|
117
|
+
)
|
118
|
+
)
|
119
|
+
|
109
120
|
TRANSFORM = Transform::Sequence.new(
|
110
121
|
[
|
111
122
|
Transform::Exception.new(SystemCallError, :read.to_proc),
|
112
|
-
Transform::Exception.new(YAML::SyntaxError, YAML.
|
123
|
+
Transform::Exception.new(YAML::SyntaxError, YAML.public_method(:safe_load)),
|
113
124
|
Transform::Hash.new(
|
114
125
|
optional: [
|
115
126
|
Transform::Hash::Key.new('coverage_criteria', ->(value) { CoverageCriteria::TRANSFORM.call(value) }),
|
116
127
|
Transform::Hash::Key.new('fail_fast', Transform::BOOLEAN),
|
128
|
+
Transform::Hash::Key.new('hooks', PATHNAME_ARRAY),
|
117
129
|
Transform::Hash::Key.new('includes', Transform::STRING_ARRAY),
|
118
130
|
Transform::Hash::Key.new('integration', Transform::STRING),
|
119
131
|
Transform::Hash::Key.new('jobs', Transform::INTEGER),
|
132
|
+
Transform::Hash::Key.new('matcher', Matcher::Config::LOADER),
|
120
133
|
Transform::Hash::Key.new('mutation_timeout', Transform::FLOAT),
|
121
|
-
Transform::Hash::Key.new('requires', Transform::STRING_ARRAY)
|
122
|
-
Transform::Hash::Key.new('matcher', Matcher::Config::LOADER)
|
134
|
+
Transform::Hash::Key.new('requires', Transform::STRING_ARRAY)
|
123
135
|
],
|
124
136
|
required: []
|
125
137
|
),
|
data/lib/mutant/context.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module Mutant
|
4
4
|
# An abstract context where mutations can be applied to.
|
5
5
|
class Context
|
6
|
-
include Adamantium
|
6
|
+
include Adamantium, Concord::Public.new(:scope, :source_path)
|
7
7
|
extend AST::Sexp
|
8
8
|
|
9
9
|
NAMESPACE_DELIMITER = '::'
|
data/lib/mutant/env.rb
CHANGED
@@ -3,8 +3,9 @@
|
|
3
3
|
module Mutant
|
4
4
|
# Abstract base class for mutant environments
|
5
5
|
class Env
|
6
|
-
include Adamantium
|
6
|
+
include Adamantium, Anima.new(
|
7
7
|
:config,
|
8
|
+
:hooks,
|
8
9
|
:integration,
|
9
10
|
:matchable_scopes,
|
10
11
|
:mutations,
|
@@ -29,9 +30,10 @@ module Mutant
|
|
29
30
|
def self.empty(world, config)
|
30
31
|
new(
|
31
32
|
config: config,
|
33
|
+
hooks: Hooks.empty,
|
32
34
|
integration: Integration::Null.new(
|
33
35
|
expression_parser: config.expression_parser,
|
34
|
-
|
36
|
+
world: world
|
35
37
|
),
|
36
38
|
matchable_scopes: EMPTY_ARRAY,
|
37
39
|
mutations: EMPTY_ARRAY,
|
@@ -136,7 +138,9 @@ module Mutant
|
|
136
138
|
|
137
139
|
def run_mutation_tests(mutation, tests)
|
138
140
|
config.isolation.call(config.mutation_timeout) do
|
141
|
+
hooks.run(:mutation_insert_pre, mutation)
|
139
142
|
result = mutation.insert(world.kernel)
|
143
|
+
hooks.run(:mutation_insert_post, mutation)
|
140
144
|
|
141
145
|
if result.equal?(Loader::Result::VoidValue.instance)
|
142
146
|
Result::Test::VoidValue.instance
|
data/lib/mutant/expression.rb
CHANGED
@@ -15,10 +15,10 @@ module Mutant
|
|
15
15
|
|
16
16
|
private(*anima.attribute_names)
|
17
17
|
|
18
|
-
MATCHERS =
|
19
|
-
'.' => [Matcher::Methods::Singleton, Matcher::Methods::Metaclass],
|
20
|
-
'#' => [Matcher::Methods::Instance]
|
21
|
-
|
18
|
+
MATCHERS = {
|
19
|
+
'.' => [Matcher::Methods::Singleton, Matcher::Methods::Metaclass].freeze,
|
20
|
+
'#' => [Matcher::Methods::Instance].freeze
|
21
|
+
}.freeze
|
22
22
|
|
23
23
|
METHOD_NAME_PATTERN = /(?<method_name>.+)/.freeze
|
24
24
|
|
@@ -12,10 +12,11 @@ module Mutant
|
|
12
12
|
|
13
13
|
private(*anima.attribute_names)
|
14
14
|
|
15
|
-
MATCHERS =
|
16
|
-
'.' => [Matcher::Methods::Singleton, Matcher::Methods::Metaclass],
|
17
|
-
'#' => [Matcher::Methods::Instance]
|
18
|
-
|
15
|
+
MATCHERS = {
|
16
|
+
'.' => [Matcher::Methods::Singleton, Matcher::Methods::Metaclass].freeze,
|
17
|
+
'#' => [Matcher::Methods::Instance].freeze
|
18
|
+
}.freeze
|
19
|
+
|
19
20
|
private_constant(*constants(false))
|
20
21
|
|
21
22
|
REGEXP = /\A#{SCOPE_NAME_PATTERN}#{SCOPE_SYMBOL_PATTERN}\z/.freeze
|