getsentry/raven-ruby — pull request #98 by johnskopis (2013-05-13 23:52:41+00:00)
Title: Attempt to handle circular references

It's possible for a sentry Client to receive an object, passed in the
extra param, containing circular references.

The MultiJson gem blows up with a signal 11 (segfault) after exhausting
the available stack space.

The standard library JSON raises a CircularDatastructure exception.

We switched to the standard library so we can handle the exception. When
we encounter a circular reference we send the exception to the Sentry
server, including the offending object as an extra param, then nillify
the extra param and try encoding the event again.

Change-Id: I48ddd50de3f6350c2025cecdc447abc9eea6b2f0
Reviewed-on: https://gerrit.causes.com/21959
Reviewed-by: John Skopis
Tested-by: John Skopis