diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-28 08:22:37 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-28 08:22:37 +0000 |
commit | b19d1e1d981e94942eee17df0309edf8b6cc68e6 (patch) | |
tree | 3e7a3928cde6e9b5ad7f7968247e631a81dc08d3 | |
parent | 32c09c25311bff2324d22978e888f3da56205b39 (diff) |
* 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
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/net/telnet.rb | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Tue Dec 28 17:18:17 2004 NAKAMURA Usaku <usa@ruby-lang.org> + + * lib/net/telnet.rb (preprocess): remove NULL unless binmode. + Tue Dec 28 15:41:48 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/nkf/nkf-utf8/nkf.c (reinit): should initialize all static 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}] |