Sha256: 1c1bcd5dba3307f2983fc31b92908f0d3d1f2e2ab200f81a962a5b5001dd7ed7
Contents?: true
Size: 404 Bytes
Versions: 15
Compression:
Stored size: 404 Bytes
Contents
module Raven class Processor::RemoveCircularReferences < Processor def process(v, visited = []) return "(...)" if visited.include?(v.__id__) visited += [v.__id__] if v.is_a?(Hash) v.reduce({}) { |memo, (k, v_)| memo[k] = process(v_, visited); memo } elsif v.is_a?(Array) v.map { |v_| process(v_, visited) } else v end end end end
Version data entries
15 entries across 15 versions & 2 rubygems