Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveSupport JSON encoding, default JSON gem and SystemStackError #368

Closed
jayeff opened this issue Mar 19, 2013 · 5 comments
Closed

ActiveSupport JSON encoding, default JSON gem and SystemStackError #368

jayeff opened this issue Mar 19, 2013 · 5 comments

Comments

@jayeff
Copy link

jayeff commented Mar 19, 2013

Hi,

after I updated to v4.6.1 I can no longer encode a Tweet to JSON with as_json / to_json. When I try to encode the tweet with a user I get a SystemStackError: stack level too deep.

Here's a gist: https://gist.github.com/jayeff/5196230 / this problem still exists on current HEAD
I'm running ruby 1.9.3-p374, OS X 10.8.2

I dug a bit into this. Bisecting says that it stopped working with ff4f2da. The problem is that when I encode the tweet, this encodes the referenced User, who references the tweet (user.status), this tweet again references the User, etc.
#364 discusses this as well. Both changes do not solve the describe problem.

@purcell
Copy link

purcell commented Mar 19, 2013

Yep, seeing this as well.

@sferik
Copy link
Owner

sferik commented Mar 19, 2013

Thanks for reporting this. I'll revert ff4f2da and release a new version of the gem.

@sferik sferik closed this as completed Mar 19, 2013
@sferik
Copy link
Owner

sferik commented Mar 20, 2013

Released version 4.6.2, which should resolve this issue.

@jayeff
Copy link
Author

jayeff commented Mar 20, 2013

It did. Thanks.

@purcell
Copy link

purcell commented Mar 20, 2013

@sferik Thanks from me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants