Add an optional create additions callback #182

wants to merge 2 commits into


None yet

1 participant


Follow up to workarounds describe in issue #179.

If not set create_additions still implements current behaviour.

If set to a proc this will be invoked in lieu of deep const get to evaluate the json class string and return a ruby class. It is up to the developer to specify the implementation details of this mapping.

Putting this out there for comments and hopeful merger into the codebase.

movitto added some commits Sep 21, 2013
@movitto movitto Expand create_additions to take optional callback
If specified json will pass the string json_class
and use the value returned as the ruby class to
@movitto movitto update autogenerated files 6dd716c

Hey just updated the patches to work on travis. Wasn't anything major, just had the wrong types for create_additions in the extensions. The builds that are failing are the allowed failures for rubinius as well as the latest ruby head (which looks to be a ruby issue as it's not even getting to installing the deps nevermind testing json itself). I'm assuming travis integration is acceptable at this point.

If there is anything else that needs TBD just shout out, would love to see this make it in so I don't have to implement one of the workarounds in rjr.


@movitto movitto referenced this pull request in movitto/rjr May 17, 2014

Poor handle_message performance #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment