lib/mutant/bootstrap.rb in mutant-0.12.2 vs lib/mutant/bootstrap.rb in mutant-0.12.3
- old
+ new
@@ -36,23 +36,23 @@
env = load_hooks(env)
.tap(&method(:infect))
.with(matchable_scopes: matchable_scopes(env))
matched_subjects = env.record(:subject_match) do
- Matcher.expand(env: env).call(env)
+ Matcher.expand(env:).call(env)
end
selected_subjects = subject_select(env, matched_subjects)
mutations = env.record(:mutation_generate) do
selected_subjects.flat_map(&:mutations)
end
setup_integration(
- env: env,
- mutations: mutations,
- selected_subjects: selected_subjects
+ env:,
+ mutations:,
+ selected_subjects:
)
end
end
# rubocop:enable Metrics/MethodLength
@@ -77,13 +77,13 @@
env.record(__method__) do
hooks = env.hooks
hooks.run(:setup_integration_pre)
Integration.setup(env).fmap do |integration|
env.with(
- integration: integration,
- mutations: mutations,
- selector: Selector::Expression.new(integration: integration),
+ integration:,
+ mutations:,
+ selector: Selector::Expression.new(integration:),
subjects: selected_subjects
)
end.tap { hooks.run(:setup_integration_post) }
end
end
@@ -118,11 +118,11 @@
def self.infect(env)
env.record(__method__) do
config, hooks, world = env.config, env.hooks, env.world
env.record(:hooks_env_infection_pre) do
- hooks.run(:env_infection_pre, env: env)
+ hooks.run(:env_infection_pre, env:)
end
env.record(:require_target) do
config.environment_variables.each do |key, value|
world.environment_variables[key] = value
@@ -131,11 +131,11 @@
config.includes.each(&world.load_path.public_method(:<<))
config.requires.each(&world.kernel.public_method(:require))
end
env.record(:hooks_env_infection_post) do
- hooks.run(:env_infection_post, env: env)
+ hooks.run(:env_infection_post, env:)
end
end
end
private_class_method :infect
# rubocop:enable Metrics/AbcSize
@@ -145,11 +145,11 @@
env.record(__method__) do
config = env.config
scopes = env.world.object_space.each_object(Module).with_object([]) do |raw_scope, aggregate|
expression = expression(config.reporter, config.expression_parser, raw_scope) || next
- aggregate << Scope.new(raw: raw_scope, expression: expression)
+ aggregate << Scope.new(raw: raw_scope, expression:)
end
scopes.sort_by { |scope| scope.expression.syntax }
end
end
@@ -175,12 +175,12 @@
unless name.instance_of?(String)
semantics_warning(
reporter,
CLASS_NAME_TYPE_MISMATCH_FORMAT,
- name: name,
+ name:,
scope_class: raw_scope.class,
- raw_scope: raw_scope
+ raw_scope:
)
return
end
expression_parser.call(name).from_right {}