Actions
Bug #12108
closedSplitting an empty string returns an empty array
Description
Splitting an empty string returns an empty array.
"".split("") # => []
"".split("a") # => []
"".split(//) # => []
"".split(/a/) # => []
Updated by sawa (Tsuyoshi Sawada) over 9 years ago
Sorry, it turns out that this was a feature (http://ruby-doc.org/core-2.3.0/String.html#method-i-split). I didn't know. I would like to retract this bug report.
Updated by Eregon (Benoit Daloze) over 9 years ago
- Status changed from Open to Rejected
Actions
Like0
Like0Like0