mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/resolv-replace.rb: specify super class for rdoc.
* lib/ipaddr.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ed2dd5e3f4
commit
66390013a1
3 changed files with 10 additions and 4 deletions
|
@ -12,7 +12,7 @@ class << IPSocket
|
|||
end
|
||||
end
|
||||
|
||||
class TCPSocket
|
||||
class TCPSocket < IPSocket
|
||||
alias original_resolv_initialize initialize
|
||||
def initialize(host, serv, *rest)
|
||||
rest[0] = IPSocket.getaddress(rest[0]) unless rest.empty?
|
||||
|
@ -20,7 +20,7 @@ class TCPSocket
|
|||
end
|
||||
end
|
||||
|
||||
class UDPSocket
|
||||
class UDPSocket < IPSocket
|
||||
alias original_resolv_bind bind
|
||||
def bind(host, port)
|
||||
host = IPSocket.getaddress(host) if host != ""
|
||||
|
@ -55,7 +55,7 @@ class UDPSocket
|
|||
end
|
||||
end
|
||||
|
||||
class SOCKSSocket
|
||||
class SOCKSSocket < TCPSocket
|
||||
alias original_resolv_initialize initialize
|
||||
def initialize(host, serv)
|
||||
original_resolv_initialize(IPSocket.getaddress(host), port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue