lib/contrast/extension/assess/array.rb in contrast-agent-4.14.1 vs lib/contrast/extension/assess/array.rb in contrast-agent-5.0.0
- old
+ new
@@ -1,11 +1,12 @@
-# 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 'contrast/agent/patching/policy/patch'
require 'contrast/agent/patching/policy/patcher'
require 'contrast/components/scope'
+require 'contrast/agent/assess/events/event_data'
module Contrast
module Extension
module Assess
# This is our patch of the Array class required to handle propagation
@@ -50,10 +51,11 @@
shift += separator_length
end
return ret unless Contrast::Agent::Assess::Tracker.tracked?(ret)
properties.cleanup_tags
- properties.build_event(ARRAY_JOIN_NODE, ret, ary, ret, [separator])
+ event_data = Contrast::Agent::Assess::Events::EventData.new ARRAY_JOIN_NODE, ret, ary, ret, [separator]
+ properties.build_event(event_data)
properties.event.instance_variable_set(:@_parent_events, parent_events)
ret
end
end
end