Sha256: e0f861c96a5e6f480efb24d5595e4a72a4ee9544e3cb89848a93a32ad801482c
Contents?: true
Size: 566 Bytes
Versions: 27
Compression:
Stored size: 566 Bytes
Contents
module Raven class Processor::RemoveCircularReferences < Processor def process(value, visited = []) return "(...)" if visited.include?(value.__id__) visited << value.__id__ if value.is_a?(Array) || value.is_a?(Hash) case value when Hash !value.frozen? ? value.merge!(value) { |_, v| process v, visited } : value.merge(value) { |_, v| process v, visited } when Array !value.frozen? ? value.map! { |v| process v, visited } : value.map { |v| process v, visited } else value end end end end
Version data entries
27 entries across 27 versions & 3 rubygems