diff options
author | Colin Kelley <colin@invoca.com> | 2023-07-19 12:32:12 -0700 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-01-17 00:45:06 +0000 |
commit | 8ae24e6b085121c6d3de61b45cf089849fe4a177 (patch) | |
tree | cac3e3dde165a4b466f8c61dd3755aa6440b58ba /ext/psych/lib/psych/visitors/yaml_tree.rb | |
parent | cf8fb9429511068c69ce70da7f7818c7441c280b (diff) |
[ruby/psych] issue #443: quote Y and N when dumping
https://github.com/ruby/psych/commit/93c8fb443a
Diffstat (limited to 'ext/psych/lib/psych/visitors/yaml_tree.rb')
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index 4abdda31d6..318f5f892b 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/lib/psych/visitors/yaml_tree.rb @@ -267,7 +267,7 @@ module Psych tag = 'tag:yaml.org,2002:str' plain = false quote = false - elsif o == 'y' || o == 'n' + elsif o == 'y' || o == 'Y' || o == 'n' || o == 'N' style = Nodes::Scalar::DOUBLE_QUOTED elsif @line_width && o.length > @line_width style = Nodes::Scalar::FOLDED |