diff --git a/MoreLinq.Test/InterleaveTest.cs b/MoreLinq.Test/InterleaveTest.cs index 84db32566..5d6384d8e 100644 --- a/MoreLinq.Test/InterleaveTest.cs +++ b/MoreLinq.Test/InterleaveTest.cs @@ -50,20 +50,6 @@ public void TestInterleaveDisposesOnErrorAtGetEnumerator() Throws.BreakException); } - /// - /// Verify that Interleave early throw ArgumentNullException when an element - /// of otherSequences is null. - /// - [Test] - public void TestInterleaveEarlyThrowOnNullElementInOtherSequences() - { - var sequenceA = Enumerable.Range(1, 1); - var otherSequences = new IEnumerable[] { null! }; - - Assert.That(() => sequenceA.Interleave(otherSequences), - Throws.ArgumentNullException("otherSequences")); - } - /// /// Verify that interleaving disposes those enumerators that it managed /// to open successfully diff --git a/MoreLinq/Interleave.cs b/MoreLinq/Interleave.cs index c053341d5..501a8f667 100644 --- a/MoreLinq/Interleave.cs +++ b/MoreLinq/Interleave.cs @@ -54,8 +54,6 @@ public static IEnumerable Interleave(this IEnumerable sequence, params { if (sequence == null) throw new ArgumentNullException(nameof(sequence)); if (otherSequences == null) throw new ArgumentNullException(nameof(otherSequences)); - if (otherSequences.Any(s => s == null)) - throw new ArgumentNullException(nameof(otherSequences), "One or more sequences passed to Interleave was null."); return Impl(otherSequences.Prepend(sequence));