diff options
author | wakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-09-06 22:18:11 +0000 |
---|---|---|
committer | wakou <wakou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-09-06 22:18:11 +0000 |
commit | 749f0f9255f22a1971d885ed174b71a5f743b658 (patch) | |
tree | c41358d8f43c2e9bd4b4071abd9d0ebaf45530d0 /lib/net/telnet.rb | |
parent | aebf069adfdc08abfd53f854f36abd6d72f69972 (diff) |
* lib/cgi.rb: CGI#doctype(): bug fix (html4Fr).
* lib/net/telnet.rb, lib/cgi.rb: remove VERSION, RELEASE_DATE,
VERSION_CODE, RELEASE_CODE. please use REVISION.
* lib/cgi.rb: CGI#header(): bug fix.
* lib/net/telnet.rb, lib/cgi.rb: concat --> +=
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/telnet.rb')
-rw-r--r-- | lib/net/telnet.rb | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/net/telnet.rb b/lib/net/telnet.rb index 380e834bea..1d523c551f 100644 --- a/lib/net/telnet.rb +++ b/lib/net/telnet.rb @@ -4,8 +4,6 @@ net/telnet.rb - simple telnet client library -Version 1.6.3 - Wakou Aoyama <wakou@fsinet.or.jp> @@ -239,10 +237,6 @@ module Net CR = "\015" LF = "\012" EOL = CR + LF - VERSION = '1.6.3' - RELEASE_DATE = '2001-02-26' - VERSION_CODE = 163 - RELEASE_CODE = 20010226 REVISION = '$Id$' def initialize(options) @@ -291,7 +285,7 @@ module Net line = x[offset, 16] end hexvals = line.unpack('H*')[0] - hexvals.concat ' ' * (32 - hexvals.length) + hexvals += ' ' * (32 - hexvals.length) hexvals = format "%s %s %s %s " * 4, *hexvals.unpack('a2' * 16) line = line.gsub(/[\000-\037\177-\377]/n, '.') printf "%s 0x%5.5x: %s%s\n", dir, addr, hexvals, line @@ -487,7 +481,7 @@ module Net end end @log.print(buf) if @options.has_key?("Output_log") - line.concat(buf) + line += buf yield buf if block_given? rescue EOFError # End of file reached if line == '' @@ -571,20 +565,20 @@ module Net if block_given? line = waitfor(/login[: ]*\z/n){|c| yield c } if password - line.concat( cmd({"String" => username, - "Match" => /Password[: ]*\z/n}){|c| yield c } ) - line.concat( cmd(password){|c| yield c } ) + line += cmd({"String" => username, + "Match" => /Password[: ]*\z/n}){|c| yield c } + line += cmd(password){|c| yield c } else - line.concat( cmd(username){|c| yield c } ) + line += cmd(username){|c| yield c } end else line = waitfor(/login[: ]*\z/n) if password - line.concat( cmd({"String" => username, - "Match" => /Password[: ]*\z/n}) ) - line.concat( cmd(password) ) + line += cmd({"String" => username, + "Match" => /Password[: ]*\z/n}) + line += cmd(password) else - line.concat( cmd(username) ) + line += cmd(username) end end line |