lib/contrast/agent/assess/policy/preshift.rb in contrast-agent-3.14.0 vs lib/contrast/agent/assess/policy/preshift.rb in contrast-agent-3.15.0

- old
+ new

@@ -75,28 +75,24 @@ object.length else 0 end return unless can + return unless Contrast::Agent::Assess::Tracker.tracked?(object) - props = Contrast::Agent::Assess::Finalizers::Finalize::PROPERTIES_HASH[object] - return unless props - - Contrast::Agent::Assess::Finalizers::Finalize::PROPERTIES_HASH[preshift.object] ||= props.dup + Contrast::Agent::Assess::Tracker.copy(object, preshift.object) end def append_arg_details preshift, args preshift.args = args.dup - preshift.args.each_with_index do |arg, index| + preshift.args.each_with_index do |preshift_arg, index| original_arg = args[index] - next if arg.__id__ == original_arg.__id__ + next if preshift_arg.__id__ == original_arg.__id__ + next unless Contrast::Agent::Assess::Tracker.tracked?(original_arg) - props = Contrast::Agent::Assess::Finalizers::Finalize::PROPERTIES_HASH[original_arg] - next unless props - - Contrast::Agent::Assess::Finalizers::Finalize::PROPERTIES_HASH[arg] ||= props.dup + Contrast::Agent::Assess::Tracker.copy(original_arg, preshift_arg) end - preshift.arg_lengths = preshift.args.map { |arg| Contrast::Utils::DuckUtils.quacks_to?(arg, :length) ? arg.length : 0 } + preshift.arg_lengths = preshift.args.map { |preshift_arg| Contrast::Utils::DuckUtils.quacks_to?(preshift_arg, :length) ? preshift_arg.length : 0 } end end end end end