Skip to content

Commit 51c5c85

Browse files
committed
Updates after upstream/master rebase
1 parent 6ad3a21 commit 51c5c85

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

src/System.Text.RegularExpressions/src/System/Buffers/MemoryOrPinnedSpan.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public MemoryOrPinnedSpan(char* pinnedSpan, int length)
2121
{
2222
_ptr = pinnedSpan;
2323
_length = length;
24+
_memory = null;
2425
}
2526

2627
public int Length => _length;

src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/GroupCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public bool TryGetValue(string key, out Group value)
224224

225225
public bool ContainsKey(string key)
226226
{
227-
return _match._regex.GroupNumberFromName(key) >= 0;
227+
return _match.Regex.GroupNumberFromName(key) >= 0;
228228
}
229229

230230
public IEnumerable<string> Keys

src/System.Text.RegularExpressions/src/System/Text/RegularExpressions/Regex.Split.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ internal SplitEnumerator(Regex regex, ReadOnlySpan<char> input, int count)
187187
_match = null;
188188
_inputIndex = _regex.RightToLeft ? input.Length : 0;
189189
_groupIndex = 1;
190+
Current = null;
190191
}
191192

192193
/// <summary>

src/System.Text.RegularExpressions/tests/Regex.Match.Tests.cs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -858,26 +858,7 @@ public void Match_Invalid()
858858
AssertExtensions.Throws<ArgumentOutOfRangeException>("length", () => new Regex("pattern").Match("input", 0, -1));
859859
AssertExtensions.Throws<ArgumentOutOfRangeException>("length", () => new Regex("pattern").Match("input", 0, 6));
860860
}
861-
862-
[Theory]
863-
[InlineData(")")]
864-
[InlineData("())")]
865-
[InlineData("[a-z-[aeiuo]")]
866-
[InlineData("[a-z-[aeiuo")]
867-
[InlineData("[a-z-[b]")]
868-
[InlineData("[a-z-[b")]
869-
[InlineData("[b-a]")]
870-
[InlineData(@"[a-c]{2,1}")]
871-
[InlineData(@"\d{2147483648}")]
872-
[InlineData("[a-z-[b][")]
873-
[InlineData(@"\")]
874-
[InlineData("(?()|||||)")]
875-
public void Match_InvalidPattern(string pattern)
876-
{
877-
AssertExtensions.Throws<ArgumentException>(null, () => Regex.Match("input", pattern));
878-
AssertExtensions.Throws<ArgumentException>(null, () => Regex.Match("input".AsMemory(), pattern));
879-
}
880-
861+
881862
[Fact]
882863
public void IsMatch_Invalid()
883864
{

0 commit comments

Comments
 (0)