Changeset [817b8ddd7d3f60f44b8aaf662b8dd78f289df567] by Dan Kubb

September 17th, 2010 @ 10:26 PM

Fixed problem with JSON::Ext::Generator::State passed in for #to_json options

  • The old code assumed that the object passed in was either nil or a Hash, or something that can be coerced into a Hash. However, in certain cases, such as when JSON itself is handling serialization, it will pass in a JSON::Ext::Generator::State object. This fix will ignore anything other than a Hash passed in.

[#1412 state:resolved] [#1360 state:resolved]

Committed by Dan Kubb

  • M lib/dm-serializer/to_json.rb
  • M spec/public/to_json_spec.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »