issue #443: quote Y and N when dumping#641
Merged
tenderlove merged 2 commits intoruby:masterfrom Jan 17, 2024
Merged
Conversation
ColinDKelley
commented
Jul 19, 2023
test/psych/test_string.rb
Outdated
| def test_n_is_quoted | ||
| assert_match(/"n"/, Psych.dump("n")) | ||
| assert_match(/"N"/, Psych.dump("N")) | ||
| end |
Contributor
Author
There was a problem hiding this comment.
@tenderlove The test below encompasses these 2 special cases, so I'd be happy to drop these 2 if you're good with it.
Member
There was a problem hiding this comment.
Yes, the test you have below seems good enough
Contributor
Author
There was a problem hiding this comment.
Great, I dropped the 2 special tests, but left the comment (updated for uppercase): 6750b35
…in the more general test
Contributor
Author
|
@tenderlove Anything else needed before merging this PR? |
Contributor
Author
|
@tenderlove Just checking in here. Anything else needed before merging this PR? |
1 similar comment
Contributor
Author
|
@tenderlove Just checking in here. Anything else needed before merging this PR? |
gordoncl
added a commit
to gordoncl/countries
that referenced
this pull request
Oct 12, 2025
Simply runs YAML files through YAML.load and YAML.dump. This is to accommodate formatting changes brought in with the latest version of psych. See ruby/psych#641 for more
gordoncl
added a commit
to gordoncl/countries
that referenced
this pull request
Oct 12, 2025
Simply runs YAML files through YAML.load and YAML.dump. This is to accommodate formatting changes brought in with the latest version of psych. Some changes are from a recent change which quotes the literals **Y** and **N*. See ruby/psych#641 for more Another change is simply from not specifying :line_width. See https://docs.ruby-lang.org/en/master/Psych.html#method-c-dump
gordoncl
added a commit
to gordoncl/countries
that referenced
this pull request
Oct 12, 2025
Simply runs YAML files through YAML.load and YAML.dump. This is to accommodate formatting changes brought in with the latest version of psych. Some changes are from a recent change which quotes the literals **Y** and **N*. See ruby/psych#641 for more Another change is simply from not specifying :line_width. See https://docs.ruby-lang.org/en/master/Psych.html#method-c-dump
gordoncl
added a commit
to gordoncl/countries
that referenced
this pull request
Oct 12, 2025
Simply runs YAML files through YAML.load and YAML.dump. This is to accommodate formatting changes brought in with the latest version of psych. Some changes are from a recent change which quotes the literals **Y** and **N*. See ruby/psych#641 for more Another change is simply from not specifying :line_width. See https://docs.ruby-lang.org/en/master/Psych.html#method-c-dump
gordoncl
added a commit
to gordoncl/countries
that referenced
this pull request
Oct 12, 2025
Simply runs YAML files through YAML.load and YAML.dump. This is to accommodate formatting changes brought in with the latest version of psych. Some changes are from a recent change which quotes the literals **Y** and **N*. See ruby/psych#641 for more Another change is simply from not specifying :line_width. See https://docs.ruby-lang.org/en/master/Psych.html#method-c-dump
gordoncl
added a commit
to gordoncl/countries
that referenced
this pull request
Oct 12, 2025
Simply runs YAML files through YAML.load and YAML.dump. This is to accommodate formatting changes brought in with the latest version of psych. Some changes are from a recent change which quotes the literals **Y** and **N*. See ruby/psych#641 for more Another change is simply from not specifying :line_width. See https://docs.ruby-lang.org/en/master/Psych.html#method-c-dump
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Building on #515, this has the uppercase fixes as well for #443.