mirror of
https://github.com/ruby/ruby.git
synced 2025-09-20 11:03:58 +02:00
merge revision(s) 37487,37563: [Backport #7278]
* lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line): don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278] * 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/branches/ruby_1_9_3@38830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
73eb0eafef
commit
c35e7519b9
4 changed files with 31 additions and 2 deletions
|
@ -310,7 +310,7 @@ module Net # :nodoc:
|
|||
|
||||
def each_crlf_line(src)
|
||||
buffer_filling(@wbuf, src) do
|
||||
while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/n)
|
||||
while line = @wbuf.slice!(/\A[^\r\n]*(?:\n|\r(?:\n|(?!\z)))/)
|
||||
yield line.chomp("\n") + "\r\n"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue