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

Version Path
sentry-raven-0.15.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.15.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.15.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.14.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.13.3 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.13.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.13.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.13.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.12.3 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.12.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.12.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.12.0 lib/raven/processor/removecircularreferences.rb
mustwin-sentry-raven-0.11.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.11.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.11.1 lib/raven/processor/removecircularreferences.rb