[前][次][番号順一覧][スレッド一覧]

ruby-changes:17625

From: akr <ko1@a...>
Date: Sat, 30 Oct 2010 07:02:48 +0900 (JST)
Subject: [ruby-changes:17625] Ruby:r29633 (trunk): * lib/resolv-replace.rb: suppress warning.

akr	2010-10-30 07:02:39 +0900 (Sat, 30 Oct 2010)

  New Revision: 29633

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29633

  Log:
    * lib/resolv-replace.rb: suppress warning.
    
    * lib/open-uri.rb: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/open-uri.rb
    trunk/lib/resolv-replace.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29632)
+++ ChangeLog	(revision 29633)
@@ -1,3 +1,9 @@
+Sat Oct 30 07:01:53 2010  Tanaka Akira  <akr@f...>
+
+	* lib/resolv-replace.rb: suppress warning.
+
+	* lib/open-uri.rb: ditto.
+
 Sat Oct 30 06:32:52 2010  Tanaka Akira  <akr@f...>
 
 	* test/pathname/test_pathname.rb (TestPathname#test_grpowned?): the
Index: lib/resolv-replace.rb
===================================================================
--- lib/resolv-replace.rb	(revision 29632)
+++ lib/resolv-replace.rb	(revision 29633)
@@ -51,7 +51,6 @@
       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)
Index: lib/open-uri.rb
===================================================================
--- lib/open-uri.rb	(revision 29632)
+++ lib/open-uri.rb	(revision 29633)
@@ -126,7 +126,7 @@
 
   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 @@
     # 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 @@
         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]

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]