https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-03-18T17:46:29ZRuby Issue Tracking SystemRuby master - Feature #3575: String#split is inconsistent with empty string and negative limithttps://redmine.ruby-lang.org/issues/3575?journal_id=247302012-03-18T17:46:29Zakr (Akira Tanaka)akr@fsij.org
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/24730/diff?detail_id=18035">diff</a>)</li></ul><p>I think Ruby thinks "" has no fields, not one field which have empty string.</p>
<p>So, "".split(",", -1) should return [].</p>
<p>Documentation issue, maybe.</p> Ruby master - Feature #3575: String#split is inconsistent with empty string and negative limithttps://redmine.ruby-lang.org/issues/3575?journal_id=249582012-03-20T08:37:14Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Category</strong> changed from <i>core</i> to <i>doc</i></li><li><strong>Assignee</strong> set to <i>drbrain (Eric Hodel)</i></li></ul><p>I will add a note to the documentation to cover the behavior of empty strings.</p> Ruby master - Feature #3575: String#split is inconsistent with empty string and negative limithttps://redmine.ruby-lang.org/issues/3575?journal_id=255012012-03-31T11:08:50Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul> Ruby master - Feature #3575: String#split is inconsistent with empty string and negative limithttps://redmine.ruby-lang.org/issues/3575?journal_id=257682012-04-10T09:57:41Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r35275.<br>
Conrad, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>string.c (rb_str_split_m): Documented behavior of split on the empty<br>
string. [ruby-trunk - Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: String#split is inconsistent with empty string and negative limit (Closed)" href="https://redmine.ruby-lang.org/issues/3575">#3575</a>]</li>
</ul> Ruby master - Feature #3575: String#split is inconsistent with empty string and negative limithttps://redmine.ruby-lang.org/issues/3575?journal_id=853502020-05-02T08:16:26Zsawa (Tsuyoshi Sawada)
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/85350/diff?detail_id=56958">diff</a>)</li></ul>