lib/contrast/extension/assess/regexp.rb in contrast-agent-6.9.0 vs lib/contrast/extension/assess/regexp.rb in contrast-agent-6.10.0
- old
+ new
@@ -15,11 +15,11 @@
# Regexp Class or exposing our methods there.
class RegexpPropagator
extend Contrast::Components::Logger::InstanceMethods
extend Contrast::Components::Scope::InstanceMethods
- REGEXP_EQUAL_SQUIGGLE_HASH = {
+ REGEXP_EQUAL_SQUIGGLE_HASH ||= { # rubocop:disable Lint/OrAssignmentToConstant
'id' => 'regexp_100',
'class_name' => 'Regexp',
'instance_method' => true,
'method_visibility' => 'public',
'method_name' => '=~',
@@ -27,10 +27,10 @@
'source' => 'P0',
'target' => 'R',
'patch_class' => 'Contrast::Extension::Assess::RegexpPropagator',
'patch_method' => 'track_equal_squiggle'
}.cs__freeze
- REGEXP_EQUAL_SQUIGGLE_NODE = Contrast::Agent::Assess::Policy::PropagationNode.new(REGEXP_EQUAL_SQUIGGLE_HASH)
+ REGEXP_EQUAL_SQUIGGLE_NODE ||= Contrast::Agent::Assess::Policy::PropagationNode.new(REGEXP_EQUAL_SQUIGGLE_HASH) # rubocop:disable Lint/OrAssignmentToConstant
private_constant :REGEXP_EQUAL_SQUIGGLE_HASH
private_constant :REGEXP_EQUAL_SQUIGGLE_NODE
class << self
def track_equal_squiggle info_hash