mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/resolv-replace.rb: suppress warning.
* lib/open-uri.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fea0365dea
commit
aeab9011fe
3 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Oct 30 07:01:53 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/resolv-replace.rb: suppress warning.
|
||||
|
||||
* lib/open-uri.rb: ditto.
|
||||
|
||||
Sat Oct 30 06:32:52 2010 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* test/pathname/test_pathname.rb (TestPathname#test_grpowned?): the
|
||||
|
|
|
@ -126,7 +126,7 @@ module OpenURI
|
|||
|
||||
def OpenURI.open_uri(name, *rest) # :nodoc:
|
||||
uri = URI::Generic === name ? name : URI.parse(name)
|
||||
mode, perm, rest = OpenURI.scan_open_optional_arguments(*rest)
|
||||
mode, _, rest = OpenURI.scan_open_optional_arguments(*rest)
|
||||
options = rest.shift if !rest.empty? && Hash === rest.first
|
||||
raise ArgumentError.new("extra arguments") if !rest.empty?
|
||||
options ||= {}
|
||||
|
@ -480,7 +480,7 @@ module OpenURI
|
|||
# It is downcased for canonicalization.
|
||||
# Content-Type parameters are stripped.
|
||||
def content_type
|
||||
type, *parameters = content_type_parse
|
||||
type, *_ = content_type_parse
|
||||
type || 'application/octet-stream'
|
||||
end
|
||||
|
||||
|
@ -712,7 +712,7 @@ module URI
|
|||
when 0 # no proxy setting anyway.
|
||||
proxy_uri = nil
|
||||
when 1
|
||||
k, v = pairs.shift
|
||||
k, _ = pairs.shift
|
||||
if k == 'http_proxy' && ENV[k.upcase] == nil
|
||||
# http_proxy is safe to use because ENV is case sensitive.
|
||||
proxy_uri = ENV[name]
|
||||
|
|
|
@ -51,7 +51,6 @@ class UDPSocket < IPSocket
|
|||
rescue Resolv::ResolvError
|
||||
raise SocketError, "Hostname not known: #{host}"
|
||||
end
|
||||
err = nil
|
||||
addrs[0...-1].each {|addr|
|
||||
begin
|
||||
return original_resolv_send(mesg, flags, addr, port)
|
||||
|
|
Loading…
Reference in a new issue