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
|
@ -1,3 +1,9 @@
|
|||
Sun Mar 21 21:09:17 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/resolv-replace.rb: specify super class for rdoc.
|
||||
|
||||
* lib/ipaddr.rb: ditto.
|
||||
|
||||
Sun Mar 21 19:52:27 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_initialize): add autoclose argument to control close
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
require 'socket'
|
||||
|
||||
unless Socket.const_defined? "AF_INET6"
|
||||
class Socket
|
||||
class Socket < BasicSocket
|
||||
AF_INET6 = Object.new
|
||||
end
|
||||
|
||||
|
|
|
@ -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
Reference in a new issue