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

json 1.4.3 breaks to_json on subclasses of String #34

Closed
mjwillson opened this issue Jun 17, 2010 · 0 comments
Closed

json 1.4.3 breaks to_json on subclasses of String #34

mjwillson opened this issue Jun 17, 2010 · 0 comments

Comments

@mjwillson
Copy link

While the 1.4.3 seems to have fixed an issue with subclasses of Hash, it seems to have broken to_json entirely for subclasses of String, which previously worked ok.

Easy to replicate:

>> require 'json/ext'
=> true
>> JSON::VERSION
=> "1.4.3"
>> class X < String; end
=> nil
>> X.new("abc").to_json
SystemStackError: stack level too deep
    from (irb):4:in `to_json'
    from (irb):4

In our case this was showing up when serializing a Sequel::SQL::Blob value.

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

No branches or pull requests

1 participant