diff options
author | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-12 06:17:25 +0000 |
---|---|---|
committer | ktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-12 06:17:25 +0000 |
commit | 0d0344c1f0f912ad048406762c6518cf997237b3 (patch) | |
tree | 9542c2115795ea4c0f3604930454b62b54ad7f5e | |
parent | 691a3a2bdc3495860405b1173d9081804a55c350 (diff) | |
download | ruby-0d0344c1f0f912ad048406762c6518cf997237b3.tar.gz |
* benchmark/driver.rb: suppress unused/shadowing variable warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | benchmark/driver.rb | 9 |
2 files changed, 8 insertions, 5 deletions
@@ -1,3 +1,7 @@ +Sun Feb 12 15:14:41 2012 Kazuki Tsujimoto <kazuki@callcc.net> + + * benchmark/driver.rb: suppress unused/shadowing variable warnings. + Sun Feb 12 03:14:40 2012 Eric Hodel <drbrain@segment7.net> * vm_eval.c (check_funcall): Call respond_to? with matching arity for diff --git a/benchmark/driver.rb b/benchmark/driver.rb index 7dab292a15..f689ebfe2c 100644 --- a/benchmark/driver.rb +++ b/benchmark/driver.rb @@ -84,7 +84,7 @@ class BenchmarkDriver 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 @@ class BenchmarkDriver 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 @@ class BenchmarkDriver 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 @@ if __FILE__ == $0 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 |