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

ruby-changes:27940

From: hsbt <ko1@a...>
Date: Fri, 29 Mar 2013 09:42:43 +0900 (JST)
Subject: [ruby-changes:27940] hsbt:r39992 (trunk): code cleanup by @vipulnsward [GH fixes #267]

hsbt	2013-03-29 09:42:32 +0900 (Fri, 29 Mar 2013)

  New Revision: 39992

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

  Log:
    code cleanup by @vipulnsward [GH fixes #267]
    
     * lib/cgi/core.rb: change each to each_value
     * ext/bigdecimal/lib/bigdecimal/{jacobian,math}.rb:
       remove unused variables from bigdecimal lib

  Modified files:
    trunk/ext/bigdecimal/lib/bigdecimal/jacobian.rb
    trunk/ext/bigdecimal/lib/bigdecimal/math.rb
    trunk/lib/cgi/core.rb

Index: lib/cgi/core.rb
===================================================================
--- lib/cgi/core.rb	(revision 39991)
+++ lib/cgi/core.rb	(revision 39992)
@@ -238,7 +238,7 @@ class CGI https://github.com/ruby/ruby/blob/trunk/lib/cgi/core.rb#L238
         arr.each {|c| buf << "Set-Cookie: #{c}#{EOL}" }
       when Hash
         hash = cookie
-        hash.each {|name, c| buf << "Set-Cookie: #{c}#{EOL}" }
+        hash.each_value {|c| buf << "Set-Cookie: #{c}#{EOL}" }
       end
     end
     if @output_cookies
Index: ext/bigdecimal/lib/bigdecimal/jacobian.rb
===================================================================
--- ext/bigdecimal/lib/bigdecimal/jacobian.rb	(revision 39991)
+++ ext/bigdecimal/lib/bigdecimal/jacobian.rb	(revision 39992)
@@ -51,7 +51,6 @@ module Jacobian https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/jacobian.rb#L51
     dx = fx[i].abs/ratio if isEqual(dx,f.zero,f.zero,f.eps)
     dx = f.one/f.ten     if isEqual(dx,f.zero,f.zero,f.eps)
     until ok>0 do
-      s = f.zero
       deriv = []
       nRetry += 1
       if nRetry > 100
Index: ext/bigdecimal/lib/bigdecimal/math.rb
===================================================================
--- ext/bigdecimal/lib/bigdecimal/math.rb	(revision 39991)
+++ ext/bigdecimal/lib/bigdecimal/math.rb	(revision 39992)
@@ -159,7 +159,6 @@ module BigMath https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/math.rb#L159
 
     d = one
     k = one
-    w = one
     t = BigDecimal("-80")
     while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0)
       m = BigDecimal.double_fig if m < BigDecimal.double_fig
@@ -171,7 +170,6 @@ module BigMath https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/math.rb#L170
 
     d = one
     k = one
-    w = one
     t = BigDecimal("956")
     while d.nonzero? && ((m = n - (pi.exponent - d.exponent).abs) > 0)
       m = BigDecimal.double_fig if m < BigDecimal.double_fig

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

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