Skip to content

Doesn't encode empty arrays #5

Closed
@arp242

Description

@arp242

For example:

puts PerfectTOML.generate({k: [1]})
# Output: k = [1]

Okay, so that's fine, but with an empty array there is no output, and the key is skipped:

puts PerfectTOML.generate({k: []})
# No output

This is a failing test case in toml-test; right now it uses toml-test 1.2 from 2022: https://github.com/mame/perfect_toml/blob/main/Rakefile#L11

Since then quite a few new tests have been added.

There are also some "invalid TOML" test cases it fails, but these are less serious. For the full output see: https://toml-lang.github.io/toml-test-matrix/output/ruby-perfect_toml.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions