     }
 
     if i != ringBuffer.startIndex {
-      var rotated: [Element] = []
+      var rotated = ContiguousArray<Element>()
       rotated.reserveCapacity(ringBuffer.count)
       rotated += ringBuffer[i..<ringBuffer.endIndex]
       rotated += ringBuffer[0..<i]
-      return rotated
-    } else {      
-      return ringBuffer
+      return Array(rotated)
+    } else {
+      return Array(ringBuffer)
     }
   }
 


    // FIXME: <rdar://problem/21885650> Create reusable RingBuffer<T>
    // Put incoming elements into a ring buffer to save space. Once all
    // elements are consumed, reorder the ring buffer into an `Array`
    // and return it. This saves memory for sequences particularly longer
    // than `maxLength`.
    var ringBuffer: [Element] = []
    ringBuffer.reserveCapacity(Swift.min(maxLength, underestimatedCount))

    var i = 0

        i = (i + 1) % k
      }
    }
    return Array(result)
  }

  /// Returns a sequence by skipping the initial, consecutive elements that
