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-2.4.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.3.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.3.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.2.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.1.4 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.1.3 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.1.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.1.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.1.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.0.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.0.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-2.0.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-1.2.3 lib/raven/processor/removecircularreferences.rb
sentry-raven-1.2.2 lib/raven/processor/removecircularreferences.rb
sentry-raven-1.2.1 lib/raven/processor/removecircularreferences.rb
sentry-raven-1.2.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-1.1.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-1.0.0 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.15.6 lib/raven/processor/removecircularreferences.rb
sentry-raven-0.15.5 lib/raven/processor/removecircularreferences.rb