lib/contrast/agent.rb in contrast-agent-6.11.0 vs lib/contrast/agent.rb in contrast-agent-6.12.0
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
+# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true
require 'English'
# This must precede other Contrast C extensions
@@ -41,10 +41,11 @@
# Framework support
require 'contrast/framework/manager'
require 'contrast/agent/thread_watcher'
+require 'contrast/utils/silence_maker'
module Contrast
# Top namespace of the Agent section. Holds tracking contexts that will be
# accessed throughout the Agent.
module Agent
@@ -90,10 +91,13 @@
#
# So that leads to this methods logic here, which somehow works
def self.reinitialize_with_log
return if Contrast::AGENT_LIB.enable_log
- Contrast.cs__const_set(:AGENT_LIB, Contrast::AgentLib::Interface.new(true, 2, nil))
+ # Silence warning about reinit AgentLib
+ Contrast::Utils::SilenceMaker.hush do
+ Contrast.cs__const_set(:AGENT_LIB, Contrast::AgentLib::Interface.new(true, 2, nil))
+ end
end
end
end
require 'contrast/utils/resource_loader'