mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
merge revision(s) 25246:
* lib/resolv.rb (Resolv::DNS.bind_random_port): bind to "::" for IPv6. (Resolv::DNS::ConnectedUDP#initialize): specify is_ipv6 argument of bind_random_port. [ruby-core:25970] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d7b8cbbaf3
commit
b27be82d83
3 changed files with 16 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Nov 20 15:49:59 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/resolv.rb (Resolv::DNS.bind_random_port): bind to "::" for IPv6.
|
||||
(Resolv::DNS::ConnectedUDP#initialize): specify is_ipv6 argument of
|
||||
bind_random_port.
|
||||
[ruby-core:25970]
|
||||
|
||||
Thu Nov 19 18:03:31 2009 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
|
||||
|
||||
* lib/cgi.rb (CGI.unescapeHTML): fix for hex values 80-FF,
|
||||
|
|
|
@ -592,10 +592,10 @@ class Resolv
|
|||
}
|
||||
end
|
||||
|
||||
def self.bind_random_port(udpsock) # :nodoc:
|
||||
def self.bind_random_port(udpsock, is_ipv6=false) # :nodoc:
|
||||
begin
|
||||
port = rangerand(1024..65535)
|
||||
udpsock.bind("", port)
|
||||
udpsock.bind(is_ipv6 ? "::" : "", port)
|
||||
rescue Errno::EADDRINUSE
|
||||
retry
|
||||
end
|
||||
|
@ -692,8 +692,9 @@ class Resolv
|
|||
super()
|
||||
@host = host
|
||||
@port = port
|
||||
@sock = UDPSocket.new(host.index(':') ? Socket::AF_INET6 : Socket::AF_INET)
|
||||
DNS.bind_random_port(@sock)
|
||||
is_ipv6 = host.index(':')
|
||||
@sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
|
||||
DNS.bind_random_port(@sock, is_ipv6)
|
||||
@sock.connect(host, port)
|
||||
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
||||
end
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#define RUBY_VERSION "1.8.7"
|
||||
#define RUBY_RELEASE_DATE "2009-11-19"
|
||||
#define RUBY_RELEASE_DATE "2009-11-20"
|
||||
#define RUBY_VERSION_CODE 187
|
||||
#define RUBY_RELEASE_CODE 20091119
|
||||
#define RUBY_PATCHLEVEL 215
|
||||
#define RUBY_RELEASE_CODE 20091120
|
||||
#define RUBY_PATCHLEVEL 216
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 8
|
||||
#define RUBY_VERSION_TEENY 7
|
||||
#define RUBY_RELEASE_YEAR 2009
|
||||
#define RUBY_RELEASE_MONTH 11
|
||||
#define RUBY_RELEASE_DAY 19
|
||||
#define RUBY_RELEASE_DAY 20
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue