I was looking up the rules for type autocasting, and it was unclear to me if the list "True", "t" and "yes" with a capital T meant that the value True had to use this exact case.
It looks like values are matched case-insensitively, so both "True" and "true" would work. And it looks like the value "y" is matched as true, which wasn't documented.
What changes did you make? (overview)
Add missing values: make sure that the values "y" (coerced to true) and "n" (coerced to false) are listed.
Try to clarify case-insensitivity: list all values in lower-case (instead of a mix of lowercase and title case), and add a note that matching is case-insensitive.
Is there anything you'd like reviewers to focus on?
Feel free to edit any of my changes. I'm not 100% happy with the way the case-sensitivity note reads, but I figured it might be better to have this note rather than not have that information.
What is the purpose of this pull request?
Small documentation change in
README.md
.I was looking up the rules for type autocasting, and it was unclear to me if the list
"True", "t" and "yes"
with a capitalT
meant that the valueTrue
had to use this exact case.Looking at the code:
https://github.com/palkan/anyway_config/blob/d54f2caf2a9efb0ec4e9a7b095a2e48dcf908ba0/lib/anyway/auto_cast.rb#L19-L24
It looks like values are matched case-insensitively, so both
"True"
and"true"
would work. And it looks like the value"y"
is matched astrue
, which wasn't documented.What changes did you make? (overview)
"y"
(coerced totrue
) and"n"
(coerced tofalse
) are listed.Is there anything you'd like reviewers to focus on?
Feel free to edit any of my changes. I'm not 100% happy with the way the case-sensitivity note reads, but I figured it might be better to have this note rather than not have that information.
Checklist