stripe/stripe-ruby — pull request #105 by andrewpthorp (2014-01-25 06:55:32+00:00)
Title: Fixes marshaling of Stripe Objects

Trying to marshal an object in ruby that has opened the singleton class gives you the following:

TypeError: singleton can't be dumped
from (irb):5:in `dump'
from (irb):5
from /Users/andrewpthorp/.rbenv/versions/1.9.3/bin/irb:12:in `

'

The solution is to add `#marshal_dump` and `#marshal_load` to the class, so the singleton class is never attempted to be marshaled.

Fixes #90