diff options
author | jeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-03 18:43:53 +0000 |
---|---|---|
committer | jeg2 <jeg2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-03 18:43:53 +0000 |
commit | 1d47275b82586e2fb35e230b379a67357d106686 (patch) | |
tree | 7595db51e12c006fb8d9914affa3b6bd56eb4706 /lib | |
parent | b0070ca057fe7e108d3ee5d630ac8034cff5b12a (diff) | |
download | ruby-1d47275b82586e2fb35e230b379a67357d106686.tar.gz ruby-1d47275b82586e2fb35e230b379a67357d106686.tar.xz ruby-1d47275b82586e2fb35e230b379a67357d106686.zip |
* lib/csv.rb: A patch from Madoka Yakamamoto to prevent an infinite
loop while reading some encodings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csv.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/csv.rb b/lib/csv.rb index fd83fdc35..774f9c3ef 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 |