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

ruby-changes:34479

From: hsbt <ko1@a...>
Date: Thu, 26 Jun 2014 18:06:06 +0900 (JST)
Subject: [ruby-changes:34479] hsbt:r46560 (trunk): * lib/webrick/httpproxy.rb: remvoe useless assigned variables.

hsbt	2014-06-26 18:05:58 +0900 (Thu, 26 Jun 2014)

  New Revision: 46560

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

  Log:
    * lib/webrick/httpproxy.rb: remvoe useless assigned variables.
    * lib/webrick/httpservlet/cgihandler.rb: ditto.
    * lib/webrick/httpservlet/erbhandler.rb: ditto.
    * lib/webrick/server.rb: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/lib/webrick/httpproxy.rb
    trunk/lib/webrick/httpservlet/cgihandler.rb
    trunk/lib/webrick/httpservlet/erbhandler.rb
    trunk/lib/webrick/server.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46559)
+++ ChangeLog	(revision 46560)
@@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jun 26 17:57:57 2014  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* lib/webrick/httpproxy.rb: remvoe useless assigned variables.
+	* lib/webrick/httpservlet/cgihandler.rb: ditto.
+	* lib/webrick/httpservlet/erbhandler.rb: ditto.
+	* lib/webrick/server.rb: ditto.
+
 Thu Jun 26 08:28:01 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* hash.c (env_select): fix memory leak and crash on Windows, make
Index: lib/webrick/httpproxy.rb
===================================================================
--- lib/webrick/httpproxy.rb	(revision 46559)
+++ lib/webrick/httpproxy.rb	(revision 46560)
@@ -203,7 +203,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/httpproxy.rb#L203
             ua.syswrite(buf)
           end
         end
-      rescue => ex
+      rescue
         os.close
         @logger.debug("CONNECT #{host}:#{port}: closed")
       end
Index: lib/webrick/httpservlet/cgihandler.rb
===================================================================
--- lib/webrick/httpservlet/cgihandler.rb	(revision 46559)
+++ lib/webrick/httpservlet/cgihandler.rb	(revision 46560)
@@ -41,9 +41,6 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/httpservlet/cgihandler.rb#L41
       # :stopdoc:
 
       def do_GET(req, res)
-        data = nil
-        status = -1
-
         cgi_in = IO::popen(@cgicmd, "wb")
         cgi_out = Tempfile.new("webrick.cgiout.", @tempdir, mode: IO::BINARY)
         cgi_out.set_encoding("ASCII-8BIT")
Index: lib/webrick/httpservlet/erbhandler.rb
===================================================================
--- lib/webrick/httpservlet/erbhandler.rb	(revision 46559)
+++ lib/webrick/httpservlet/erbhandler.rb	(revision 46560)
@@ -56,7 +56,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/httpservlet/erbhandler.rb#L56
           res.body = evaluate(ERB.new(data), req, res)
           res['content-type'] ||=
             HTTPUtils::mime_type(@script_filename, @config[:MimeTypes])
-        rescue StandardError => ex
+        rescue StandardError
           raise
         rescue Exception => ex
           @logger.error(ex)
Index: lib/webrick/server.rb
===================================================================
--- lib/webrick/server.rb	(revision 46559)
+++ lib/webrick/server.rb	(revision 46560)
@@ -288,7 +288,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/server.rb#L288
         Utils::set_non_blocking(sock)
         Utils::set_close_on_exec(sock)
       rescue Errno::ECONNRESET, Errno::ECONNABORTED,
-             Errno::EPROTO, Errno::EINVAL => ex
+             Errno::EPROTO, Errno::EINVAL
       rescue StandardError => ex
         msg = "#{ex.class}: #{ex.message}\n\t#{ex.backtrace[0]}"
         @logger.error msg

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

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