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

ruby-changes:22512

From: ktsj <ko1@a...>
Date: Mon, 13 Feb 2012 08:55:29 +0900 (JST)
Subject: [ruby-changes:22512] ktsj:r34567 (trunk): * benchmark/driver.rb: suppress unused/shadowing variable warnings.

ktsj	2012-02-12 15:17:25 +0900 (Sun, 12 Feb 2012)

  New Revision: 34567

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

  Log:
    * benchmark/driver.rb: suppress unused/shadowing variable warnings.

  Modified files:
    trunk/ChangeLog
    trunk/benchmark/driver.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 34566)
+++ ChangeLog	(revision 34567)
@@ -1,3 +1,7 @@
+Sun Feb 12 15:14:41 2012  Kazuki Tsujimoto  <kazuki@c...>
+
+	* benchmark/driver.rb: suppress unused/shadowing variable warnings.
+
 Sun Feb 12 03:14:40 2012  Eric Hodel  <drbrain@s...>
 
 	* vm_eval.c (check_funcall):  Call respond_to? with matching arity for
Index: benchmark/driver.rb
===================================================================
--- benchmark/driver.rb	(revision 34566)
+++ benchmark/driver.rb	(revision 34567)
@@ -84,7 +84,7 @@
     if @verbose
       @start_time = Time.now
       message @start_time
-      @execs.each_with_index{|(e, v), i|
+      @execs.each_with_index{|(_, v), i|
         message "target #{i}: #{v}"
       }
     end
@@ -116,7 +116,7 @@
     difference = "\taverage difference" if @execs.length == 2
     total_difference = 0
 
-    output "name\t#{@execs.map{|(e, v)| v}.join("\t")}#{difference}"
+    output "name\t#{@execs.map{|(_, v)| v}.join("\t")}#{difference}"
     @results.each{|v, result|
       rets = []
       s = nil
@@ -154,7 +154,6 @@
 
   def files
     flag = {}
-    vm1 = vm2 = wl1 = wl2 = false
     @files = Dir.glob(File.join(@dir, 'bm*.rb')).map{|file|
       next if @pattern && /#{@pattern}/ !~ File.basename(file)
       case file
@@ -253,8 +252,8 @@
     o.on('-r', '--repeat-count [NUM]', "Repeat count"){|n|
       opt[:repeat] = n.to_i
     }
-    o.on('-o', '--output-file [FILE]', "Output file"){|o|
-      opt[:output] = o
+    o.on('-o', '--output-file [FILE]', "Output file"){|f|
+      opt[:output] = f
     }
     o.on('-q', '--quiet', "Run without notify information except result table."){|q|
       opt[:quiet] = q

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

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