Project

General

Profile

Actions

Bug #12108

closed

Splitting an empty string returns an empty array

Added by sawa (Tsuyoshi Sawada) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:73962]

Description

Splitting an empty string returns an empty array.

"".split("") # => []
"".split("a") # => []
"".split(//) # => []
"".split(/a/) # => []

Updated by sawa (Tsuyoshi Sawada) about 8 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) about 8 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0