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

Ruby implementation of JSON.pretty_generate generates different output to C extension for at least an empty hash #441

Closed
chrisseaton opened this issue Jul 28, 2020 · 1 comment · Fixed by #449

Comments

@chrisseaton
Copy link
Contributor

From oracle/truffleruby#2053.

require 'json'
puts JSON.pretty_generate({})
% chruby 2.6.5
% ruby -v test.rb
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]
{
}
% chruby truffleruby-20.1.0
% ruby -v test.rb
truffleruby 20.1.0, like ruby 2.6.5, GraalVM CE Native [x86_64-darwin]
{

}

@eregon then pointed out:

$ ruby -v -e 'require "json/pure"; puts JSON.pretty_generate({})'
ruby 2.6.6p146 (2020-03-31 revision 67876) [x86_64-linux]
{

}

Possibly related to #440?

@chrisseaton
Copy link
Contributor Author

This is JSON 2.1.0, I think as shipped in MRI 2.6.6.

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