1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/socket.c (Init_socket): IPv6 is not supported although

AF_INET6 is defined on MinGW.

* lib/ipaddr.rb (AF_INET6): workaround in the environment which does
  not support IPv6.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2003-12-14 10:04:35 +00:00
parent d2e6f552f3
commit cd4d74e9be
3 changed files with 22 additions and 2 deletions

View file

@ -32,6 +32,18 @@
require 'socket'
unless Socket.const_defined? "AF_INET6"
class Socket
AF_INET6 = Object.new
end
class << IPSocket
alias getaddress_orig getaddress
def getaddress(s)
/^::/ =~ s ? s : getaddress_orig(s)
end
end
end
# IPAddr provides a set of methods to manipulate an IP address. Both
# IPv4 and IPv6 are supported.
class IPAddr