lib/contrast/extension/assess/hash.rb in contrast-agent-3.14.0 vs lib/contrast/extension/assess/hash.rb in contrast-agent-3.15.0
- old
+ new
@@ -13,13 +13,12 @@
include Contrast::Components::Interface
access_component :logging
class << self
def cs__duplicate_and_freeze object
return object unless object.is_a?(String) && !object.cs__frozen?
- return object unless object.cs__tracked?
+ return object unless Contrast::Agent::Assess::Tracker.tracked?(object)
- ret = object.dup
- object.cs__transfer_properties(ret)
+ ret = Contrast::Agent::Assess::Tracker.duplicate(object)
ret.cs__freeze
rescue StandardError
# we'll rescue this error, but we can't log it here as that will
# result in a seg fault
end