From 08f7b027213023935a0206e99f065c041c0a99d5 Mon Sep 17 00:00:00 2001 From: yugui Date: Wed, 4 Mar 2009 09:21:29 +0000 Subject: merges r22743 from trunk into ruby_1_9_1. -- * lib/csv.rb: A patch from Madoka Yakamamoto to prevent an infinite loop while reading some encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/csv.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/csv.rb b/lib/csv.rb index fd83fdc354..774f9c3ef3 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -2282,9 +2282,7 @@ class CSV 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 -- cgit v1.2.3