lib/contrast/agent/patching/policy/patcher.rb in contrast-agent-4.14.1 vs lib/contrast/agent/patching/policy/patcher.rb in contrast-agent-5.0.0
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (c) 2021 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
+# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true
require 'monitor'
# base
@@ -13,12 +13,10 @@
require 'contrast/utils/patching/policy/patcher_utils'
# assess
require 'contrast/agent/assess/policy/policy'
require 'contrast/agent/assess/policy/policy_scanner'
-# TODO: RUBY-714 remove guard w/ EOL of 2.5
-require 'contrast/agent/assess/policy/rewriter_patch' if RUBY_VERSION < '2.6.0'
require 'contrast/agent/assess/policy/source_method'
require 'contrast/agent/assess/policy/trigger_method'
# deadzone
require 'contrast/agent/deadzone/policy/policy'
@@ -54,11 +52,9 @@
# instrumentation of the application - this only occurs once, during
# startup to catchup on everything we didn't see get loaded
def patch
catchup_after_load_patches
catchup_loaded_methods
- # TODO: RUBY-714 remove guard w/ EOL of 2.5
- Contrast::Agent::Assess::Policy::RewriterPatch.rewrite_interpolations if RUBY_VERSION < '2.6.0'
end
# Hook to only monkeypatch Contrast. This will not trigger any
# other functions, like rewriting or scanning. Exposed for those
# situations, like ActiveRecord dynamically defining functions,