aboutsummaryrefslogtreecommitdiffstats
path: root/lib/open-uri.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-29 22:02:39 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-29 22:02:39 +0000
commitaeab9011fef77ea09786818a01a684c5f8adbd4a (patch)
tree9eee7a522bf73fd317ce35457a681b6cb4dea194 /lib/open-uri.rb
parentfea0365dea00cf7a120c07b76f9cc47c2d66e105 (diff)
downloadruby-aeab9011fef77ea09786818a01a684c5f8adbd4a.tar.gz
* 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
Diffstat (limited to 'lib/open-uri.rb')
-rw-r--r--lib/open-uri.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/open-uri.rb b/lib/open-uri.rb
index 6706068300..c8393fa437 100644
--- a/lib/open-uri.rb
+++ b/lib/open-uri.rb
@@ -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]