diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-18 09:03:16 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-10-18 09:03:16 +0000 |
commit | 125ca1a11a53810ac311012352f5b0773fc2bbde (patch) | |
tree | 2b9ac558373e9742e475be19fed72bfb7924a0f9 /lib/net/session.rb | |
parent | 40a3f601e43a137e56b2c28454ffb6ce79d7ec7e (diff) |
19991018
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/session.rb')
-rw-r--r-- | lib/net/session.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/net/session.rb b/lib/net/session.rb index 3f7ef7f51f..3863d8506e 100644 --- a/lib/net/session.rb +++ b/lib/net/session.rb @@ -1,6 +1,6 @@ =begin -= Net module version 1.0.2 reference manual += Net module version 1.0.3 reference manual session.rb written by Minero Aoki <aamine@dp.u-netsurf.ne.jp> @@ -39,7 +39,7 @@ Object : Version - The version of Session class. It is a string like "1.0.2". + The version of Session class. It is a string like "1.0.3". =end @@ -48,7 +48,7 @@ module Net class Session - Version = '1.0.2' + Version = '1.0.3' =begin @@ -71,7 +71,9 @@ module Net proto_initialize @address = addr @port = port if port + @active = false + @pipe = nil end class << self @@ -133,12 +135,12 @@ module Net return false if active? @active = true - if ProtocolSocket === args[0] then - @socket = args.shift - @socket.pipe = @pipe + if Class === args[0] then + c = args.shift else - @socket = ProtocolSocket.open( @address, @port, @pipe ) + c = ProtocolSocket end + @socket = c.open( @address, @port, @pipe ) @pipe = nil @proto = @proto_type.new( @socket ) |