jm / toml

Parse TOML. Like a bawss.
MIT License
151 stars 37 forks source link

Nest arrays are parsed improperly #6

Closed cespare closed 11 years ago

cespare commented 11 years ago

Issue discovered using toml-test; see the test methodology and output in this gist.

I believe there are two (related?) errors when parsing nested arrays.

#  Shouldn't this produce an Array?
TOML.load("a = [[]]")["a"][0].class # => "Parslet::Slice"

# Extra nesting levels are discarded
TOML.load("a = [[[[1]]]]")["a"].inspect # => "[1]"