lib/raven/processor/removecircularreferences.rb in sentry-raven-0.15.2 vs lib/raven/processor/removecircularreferences.rb in sentry-raven-0.15.3

- old
+ new

@@ -1,17 +1,15 @@ 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 } + 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