Sha256: 89022da6dadf3ca72e638ff26c950ab1c2f4147946cb2f8905b1407e9153d8d3
Contents?: true
Size: 406 Bytes
Versions: 22
Compression:
Stored size: 406 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.each_with_object({}) { |(k, v_), memo| memo[k] = process(v_, visited) } elsif v.is_a?(Array) v.map { |v_| process(v_, visited) } else v end end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
sentry-raven-0.15.4 | lib/raven/processor/removecircularreferences.rb |
sentry-raven-0.15.3 | lib/raven/processor/removecircularreferences.rb |