_"Bare keys may only contain ASCII letters, ASCII digits, underscores, and dashes (A-Za-z0-9-). Note that bare keys are allowed to be composed of only ASCII digits, e.g. 1234, but are always interpreted as strings."__
This means the following should be interpreted as a comment line and not a value key/value pair:
#foobar = 3
However, as the toml gem codebase currently stands, this is interpreted as a string keyword which is typically represented in Toml with:
"#foobar" = 3
(As far as I could tell skimming the code base, only bare keys are currently supported anyway).
With this patch, we put precedence on comments, and therefore this matches a comment form rather than a keyword form earlier.
Note:
The rest of the tests still pass, although this precedence change could obviously have other ramifications that perhaps are not currently being tested.
…omment line
From the Toml spec (https://toml.io/en/v1.0.0-rc.3):
_"Bare keys may only contain ASCII letters, ASCII digits, underscores, and dashes (A-Za-z0-9-). Note that bare keys are allowed to be composed of only ASCII digits, e.g. 1234, but are always interpreted as strings."__
This means the following should be interpreted as a comment line and not a value key/value pair:
However, as the
toml
gem codebase currently stands, this is interpreted as a string keyword which is typically represented in Toml with:(As far as I could tell skimming the code base, only bare keys are currently supported anyway).
With this patch, we put precedence on comments, and therefore this matches a comment form rather than a keyword form earlier.
Note:
The rest of the tests still pass, although this precedence change could obviously have other ramifications that perhaps are not currently being tested.