Skip to content

Fix exception when options is JSON::Ext #496

wants to merge 1 commit into from

4 participants

svasva commented Jan 27, 2014

No description provided.


Under normal use you shouldn't be fed that – this might be a bug in Rails itself. What version of Rails are you using, and can you post the code that causes this?

mikegee commented Jan 28, 2014

This is the right way to make sure options is a Hash. I think its a good change even if Rails always sends a Hash. This gem should strive to be decoupled from Rails where possible.

svasva commented Jan 28, 2014

In my case this was happening when running JRuby. Nothing else is special.


@erundook Are you doing something like JSON.dump( by any chance? (Maybe indirectly, through a gem?)

@mikegee as_json itself is actually a Rails-specific hook. If options is not a hash, it's probably being called by some incompatible implementations (you can read about the details at intridea/multi_json#138 (comment))


I'd like to see this fixed upstream, as this should always be a hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.