rubyamf / rocketamf

52 stars 34 forks source link

Add support for serializing Numeric subclasses #3

Closed warhammerkid closed 13 years ago

warhammerkid commented 13 years ago

@kirillian:

Infinite loop when serializing BigDecimal (SystemStackError Exception: stack level too deep)

I kept getting an infinite loop issue on some of my models and after quite a lot of frustration and tracing, finally noticed that I was seeing a BigDecimal class in my variables...after doing some checking and not finding support, I checked out how these had previously been handled in other AMF serializers and saw them being converted to Floats, so I forked and added in a fix.

For people trying to troubleshoot, the errors I was seeing looked like this: SystemStackError Exception: stack level too deep

Upon tracing through callstacks, I saw repetition through these methods on the serializer: serialize write_prop_list write_object serialize

warhammerkid commented 13 years ago

Fixed in efe018dc8cbcd9406f40f036e0fae5bb10a6071e