We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0be3c1c commit 6a3f6a0Copy full SHA for 6a3f6a0
1 file changed
Src/IronPython/Runtime/Operations/StringOps.cs
@@ -2079,7 +2079,9 @@ static CodecsInfo() {
2079
#if DEBUG
2080
foreach (KeyValuePair<string, Lazy<Encoding?>> kvp in d) {
2081
// all codecs should be stored in lowercase because we only look up from lowercase strings
2082
- Debug.Assert(kvp.Key.Equals(kvp.Key, StringComparison.OrdinalIgnoreCase));
+ #pragma warning disable CA1862 // disable warning about comparing with ToLower()
2083
+ Debug.Assert(kvp.Key.ToLower(CultureInfo.InvariantCulture) == kvp.Key);
2084
+ #pragma warning restore
2085
// all codec names should use underscores instead of dashes to match lookup values
2086
Debug.Assert(kvp.Key.IndexOf('-') < 0);
2087
}
0 commit comments