From 1678f5def1c5e15bb2ef8af3807bfba7bef4e77c Mon Sep 17 00:00:00 2001 From: kakutani Date: Sun, 4 Nov 2012 17:39:57 -0700 Subject: [PATCH] lib/net/protocol.rb: Suppress warning message --- lib/net/protocol.rb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index 9733d56..29e010a 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -322,6 +322,7 @@ module Net # :nodoc: def each_crlf_line(src) buffer_filling(@wbuf, src) do + @wbuf.force_encoding('ASCII-8BIT') while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/n) yield line.chomp("\n") + "\r\n" end -- 1.7.4.4