[Issue 8084] New: std.stdio.ByLine is not true input range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 11 10:53:43 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8084

           Summary: std.stdio.ByLine is not true input range
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-05-11 10:55:07 PDT ---
version(A) and version(B) should output same result, but A is completely
broken.

import std.array;
import std.stdio;
void main()
{
    string fname = __FILE__;
    version(A)
    {
        auto lines = File(fname).byLine().array();
        foreach (ln; lines)
            writeln(ln);
    }
    version(B)
    {
        foreach (ln; File(fname).byLine())
            writeln(ln);
    }
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list