summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-28 08:22:37 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-28 08:22:37 +0000
commitb19d1e1d981e94942eee17df0309edf8b6cc68e6 (patch)
tree3e7a3928cde6e9b5ad7f7968247e631a81dc08d3
parent32c09c25311bff2324d22978e888f3da56205b39 (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--ChangeLog4
-rw-r--r--lib/net/telnet.rb3
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 23b100b196..a7b85cacf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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}]