The limit calculation used to determine when to end the loop is wrong, and will result in an ArrayIndexOutOfBoundsException for a non-zero start. This was pointed out in #scala tonight (possibly earlier).
This patch adds test cases to handle this situation, as well as a situation where start itself exceed the array length. I elected not to add checks for negative start and length parameters, although these could easily be added.
The text was updated successfully, but these errors were encountered: