summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-07 00:56:10 +0000
committerwakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-09-07 00:56:10 +0000
commit6e2490beb56a2c6498393517d61eaf3d777ed2e5 (patch)
tree249c9a292a1dfc488ec0f1ba424ebdf2bbc35ba0
parent749f0f9255f22a1971d885ed174b71a5f743b658 (diff)
* lib/net/telnet.rb: waitfor(): bug fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/net/telnet.rb5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9b8c56946a6..45c74696725 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Sep 7 09:44:44 2001 Wakou Aoyama <wakou@fsinet.or.jp>
+
+ * lib/net/telnet.rb: waitfor(): bug fix.
+
Fri Sep 7 07:11:34 2001 Wakou Aoyama <wakou@fsinet.or.jp>
* lib/cgi.rb: CGI#doctype(): bug fix (html4Fr).
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb
index 1d523c551f2..0a520eaabb9 100644
--- a/lib/net/telnet.rb
+++ b/lib/net/telnet.rb
@@ -467,13 +467,14 @@ module Net
begin
c = @sock.sysread(1024 * 1024)
@dumplog.log_dump('<', c) if @options.has_key?("Dump_log")
+ c = rest + c
if @options["Telnetmode"]
if Integer(c.rindex(/#{IAC}#{SE}/no)) <
Integer(c.rindex(/#{IAC}#{SB}/no))
- buf = preprocess(rest + c[0 ... c.rindex(/#{IAC}#{SB}/no)])
+ buf = preprocess(c[0 ... c.rindex(/#{IAC}#{SB}/no)])
rest = c[c.rindex(/#{IAC}#{SB}/no) .. -1]
elsif pt = c.rindex(/#{IAC}[^#{IAC}#{AO}#{AYT}#{DM}#{IP}#{NOP}]?\z/no)
- buf = preprocess(rest + c[0 ... pt])
+ buf = preprocess(c[0 ... pt])
rest = c[pt .. -1]
else
buf = preprocess(c)