File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -17,20 +17,11 @@ def initialize
1717 end
1818 end
1919
20- # 'y' and 'n' are kind of ambiguous. Syck treated y and n literals in
20+ # 'y', 'Y', 'n', 'N' are kind of ambiguous. Syck treated those literals in
2121 # YAML documents as strings. But this is not what the YAML 1.1 spec says.
2222 # YAML 1.1 says they should be treated as booleans. When we're dumping
2323 # documents, we know it's a string, so adding quotes will eliminate the
2424 # "ambiguity" in the emitted document
25- def test_y_is_quoted
26- assert_match ( /"y"/ , Psych . dump ( "y" ) )
27- assert_match ( /"Y"/ , Psych . dump ( "Y" ) )
28- end
29-
30- def test_n_is_quoted
31- assert_match ( /"n"/ , Psych . dump ( "n" ) )
32- assert_match ( /"N"/ , Psych . dump ( "N" ) )
33- end
3425
3526 def test_all_yaml_1_1_booleans_are_quoted
3627 yaml_1_1_booleans = %w[ y Y yes Yes YES n N no No NO true True TRUE false False FALSE on On ON off Off OFF ] # from https://yaml.org/type/bool.html
You can’t perform that action at this time.
0 commit comments