diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-08 10:04:24 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-08 10:04:24 +0000 |
commit | 6ce8c33936d59716a0676d2ec8e22b22e2a1da94 (patch) | |
tree | da4b93ad550ac1e893a058177fa3520a78659adb /lib | |
parent | edb68694b8c2a36704257470631792dad498bf87 (diff) |
* lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):
treat \r as newline as mame pointed. [ruby-dev:46425] [Bug #7278]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/protocol.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index 6b79f9efcc..14a68e1115 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -322,7 +322,7 @@ module Net # :nodoc: def each_crlf_line(src) buffer_filling(@wbuf, src) do - while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/) + while line = @wbuf.slice!(/\A[^\r\n]*(?:\n|\r(?:\n|(?!\z)))/) yield line.chomp("\n") + "\r\n" end end |