I ran into a few bugs: Regex | Text | Limit | Expected | Actual | Notes ------|---------|--------|-----------------|--------------|------- `"-"` | `"a"` | _none_ | `["a"]` | `["a"]` | `"-"` | `"a-"` | _none_ | `["a", ""]` | `["a"]` | incorrect `"-"` | `"a--"` | _none_ | `["a", "", ""]` | `["a", ""]` | incorrect `"-"` | `"a"` | 2 | `["a"]` | `["a", ""]` | #521 `"-"` | `"a-"` | 2 | `["a", ""]` | `["a", ""]` | `"-"` | `"a--"` | 2 | `["a", "-"]` | `["a", "-"]` | See also #521: `splitn` incorrectly returns a trailing `""` if there is one fewer part than the limit.