Issue #3575 has been updated by akr.

Description updated

I think Ruby thinks "" has no fields, not one field which have empty string.

So, "".split(",", -1) should return [].

Documentation issue, maybe.
----------------------------------------
Feature #3575: String#split is inconsistent with empty string and negative limit
https://bugs.ruby-lang.org/issues/3575#change-24730

Author: Conrad.Irwin
Status: Open
Priority: Low
Assignee: 
Category: core
Target version: 


=begin
 I expect: "".split(",", -1) == [""]
 Currently: "".split(",", -1) == []
 
 According to the documentation, blank fields should not be stripped when a negative offset is provided.
=end



-- 
http://bugs.ruby-lang.org/