From b19d1e1d981e94942eee17df0309edf8b6cc68e6 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 28 Dec 2004 08:22:37 +0000 Subject: * lib/net/telnet.rb (preprocess): remove NULL unless binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/telnet.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/net/telnet.rb') diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb index 05691de0f7..1ac5f25f09 100644 --- a/lib/net/telnet.rb +++ b/lib/net/telnet.rb @@ -438,6 +438,9 @@ module Net # combine EOL into "\n" string = string.gsub(/#{EOL}/no, "\n") unless @options["Binmode"] + # remove NULL + string = string.gsub(/#{NULL}/no, '') unless @options["Binmode"] + string.gsub(/#{IAC}( [#{IAC}#{AO}#{AYT}#{DM}#{IP}#{NOP}]| [#{DO}#{DONT}#{WILL}#{WONT}] -- cgit v1.2.3