1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix an issue with generate_pretty and empty objects in the Ruby and Java implementations

This commit is contained in:
Chris Seaton 2020-10-07 03:13:48 +01:00 committed by Hiroshi SHIBATA
parent 520e0916af
commit 451836f582
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -92,6 +92,11 @@ EOT
end
def test_generate_pretty
json = pretty_generate({})
assert_equal(<<'EOT'.chomp, json)
{
}
EOT
json = pretty_generate(@hash)
# hashes aren't (insertion) ordered on every ruby implementation
# assert_equal(@json3, json)