localshred/protobuf — pull request #190 by localshred (2014-03-13 16:50:46+00:00)
Title: Message.to_json returns the name of the class

This fixes a long-standing bug caused by circular references in the way the
Field system is implemented.

The spec wraps the call to to_json in a timeout because the recursive checks
are unbounded and will eat memory and cpu forever. The simplest solution is to
simply return the name of the message when asked for the json representation
at the class level.

h/t to @abrandoned and @liveh2o for finding this insane bug.