I’m not sure this is the right place to report issues about Syck but
the best I’ve found so far I think I’ve found a problem with the way
quotes strings that could look like floats. Here is a short example:
irb(main):001:0> require ‘yaml’
irb(main):002:0> YAML.dump([“1.2”, “1.2.3”, “1.2_3”])
=> “— \n- “1.2”\n- 1.2.3\n- 1.2_3\n”
The first element is quoted appropriately, the second isn’t because
no ambiguity but the third should be quoted. The YAML float can have
underscores, they’re used as visual separators and should be ignored by
parser. So when seeing 1.2_3 the parser should read the float 1.23. Then
disambiguates the string “1.2_3” should be quoted.
Practically this isn’t really a problem as YAML converts on writes so
YAML.dump(1.2_3) gets directly written as 1.23. However it creates some
interoperability issues when “1.2_3” gest written unquoted by Syck and
read by another parser as being 1.23. The string isn’t a string anymore
What do you think?