Bug 14230 – [REG2.067b2] std.array.join misses the first element which is empty string

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-02-28T02:45:00Z
Last change time
2017-07-19T17:42:17Z
Keywords
pull
Assigned to
nobody
Creator
jiki

Comments

Comment #0 by jiki — 2015-02-28T02:45:38Z
I sometimes use join() in this way. join( [""] ~ ["aa","bb","cc"], " @" ) --> " @aa @bb @cc" This doesn't work properly in D2. This is a regression, probably. ------------------------------------------------------ import std.stdio; import std.array; void main() { string[] ary = ["","aa","bb","cc"]; // leaded by _empty_ element writeln(ary.join(" @")); // In 2.067b2, this outputs "aa @bb @cc" or asserts inside of join() assert(ary.join(" @") == " @aa @bb @cc"); // OK in 2.067b1 and olders } ------------------------------------------------------
Comment #1 by github-bugzilla — 2015-02-28T21:03:20Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/43e56d57a51ef6a3240a459d3e6068fc4a9292a5 Fix Issue 14230 - std.array.join misses the first element which is empty string https://github.com/D-Programming-Language/phobos/commit/b43a7b8b6095e19d93d479942c084e6f588adc3d Merge pull request #3027 from sinkuu/fix_14230 Fix Issue 14230 - [REG2.067b2] std.array.join misses the first element which is empty string
Comment #2 by github-bugzilla — 2015-02-28T21:13:11Z
Commit pushed to 2.067 at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/b4fa59bd736c30c183039044fe48d7477a1cc615 Merge pull request #3027 from sinkuu/fix_14230 Fix Issue 14230 - [REG2.067b2] std.array.join misses the first element which is empty string
Comment #3 by dlang-bugzilla — 2015-03-22T21:59:15Z
Comment #4 by github-bugzilla — 2015-04-11T12:24:52Z
Comment #5 by github-bugzilla — 2015-06-17T21:03:12Z
Comment #6 by github-bugzilla — 2017-07-19T17:42:17Z
Commits pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/43e56d57a51ef6a3240a459d3e6068fc4a9292a5 Fix Issue 14230 - std.array.join misses the first element which is empty string https://github.com/dlang/phobos/commit/b43a7b8b6095e19d93d479942c084e6f588adc3d Merge pull request #3027 from sinkuu/fix_14230