ruby-changes:11139
From: jeg2 <ko1@a...>
Date: Wed, 4 Mar 2009 03:44:20 +0900 (JST)
Subject: [ruby-changes:11139] Ruby:r22743 (trunk): * lib/csv.rb: A patch from Madoka Yakamamoto to prevent an infinite
jeg2 2009-03-04 03:43:53 +0900 (Wed, 04 Mar 2009) New Revision: 22743 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22743 Log: * lib/csv.rb: A patch from Madoka Yakamamoto to prevent an infinite loop while reading some encodings. Modified files: trunk/ChangeLog trunk/lib/csv.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 22742) +++ ChangeLog (revision 22743) @@ -1,3 +1,8 @@ +Wed Mar 4 03:42:56 2009 James Edward Gray II <jeg2@r...> + + * lib/csv.rb: A patch from Madoka Yakamamoto to prevent an infinite + loop while reading some encodings. + Wed Mar 4 00:54:43 2009 Yuki Sonoda (Yugui) <yugui@y...> * lib/prime.rb (Prime::prime?): used to return a wrong answer. Index: lib/csv.rb =================================================================== --- lib/csv.rb (revision 22742) +++ lib/csv.rb (revision 22743) @@ -2282,9 +2282,7 @@ if @io.eof? or data.size >= bytes + 10 return data else - data += @io.read(1) until data.valid_encoding? or - @io.eof? or - data.size >= bytes + 10 + data += @io.read(1) retry end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/