ruby-changes:3178
From: ko1@a...
Date: 25 Dec 2007 15:38:12 +0900
Subject: [ruby-changes:3178] akr - Ruby:r14671 (trunk): * io.c (appendline): initialize rslen to 1 if rsptr is 0.
akr 2007-12-25 15:38:00 +0900 (Tue, 25 Dec 2007) New Revision: 14671 Modified files: trunk/ChangeLog trunk/io.c Log: * io.c (appendline): initialize rslen to 1 if rsptr is 0. rslen should be the length of the delimiter. if only delim is given, it should be 1. [ruby-dev:32746] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14671&r2=14670 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=14671&r2=14670 Index: ChangeLog =================================================================== --- ChangeLog (revision 14670) +++ ChangeLog (revision 14671) @@ -1,3 +1,10 @@ +Tue Dec 25 15:24:57 2007 Tanaka Akira <akr@f...> + + * io.c (appendline): initialize rslen to 1 if rsptr is 0. + rslen is the length of the delimiter. + if only delim is given, it should be 1. + [ruby-dev:32746] + Tue Dec 25 15:21:33 2007 Nobuyoshi Nakada <nobu@r...> * transcode.c (transcode_dispatch): fix for multistep transcode. Index: io.c =================================================================== --- io.c (revision 14670) +++ io.c (revision 14671) @@ -1672,6 +1672,9 @@ long limit = *lp; rb_encoding *enc = io_input_encoding(fptr); + if (rsptr == 0) + rslen = 1; + do { long pending = READ_DATA_PENDING_COUNT(fptr); if (pending > 0) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml