aboutsummaryrefslogtreecommitdiffstats
path: root/lib/benchmark.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-19 00:07:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-19 00:07:25 +0000
commitd371e3583e3b1e0692f92343017b62d2628190ff (patch)
treebe82924ada754f8542f394d0a3d28e0a0b02a098 /lib/benchmark.rb
parent1fae66fca28167ca0e25625091c5df49405b8023 (diff)
downloadruby-d371e3583e3b1e0692f92343017b62d2628190ff.tar.gz
* lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/benchmark.rb')
-rw-r--r--lib/benchmark.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/benchmark.rb b/lib/benchmark.rb
index f3d1cca8f1..84ed6c77f9 100644
--- a/lib/benchmark.rb
+++ b/lib/benchmark.rb
@@ -520,14 +520,14 @@ module Benchmark
cutime.__send__(op, x.cutime),
cstime.__send__(op, x.cstime),
real.__send__(op, x.real)
- )
+ )
else
Benchmark::Tms.new(utime.__send__(op, x),
stime.__send__(op, x),
cutime.__send__(op, x),
cstime.__send__(op, x),
real.__send__(op, x)
- )
+ )
end
end
end
@@ -548,13 +548,13 @@ if __FILE__ == $0
x.report("for:") {for _ in 1..n; _ = "1"; end} # Benchmark.measure
x.report("times:") {n.times do ; _ = "1"; end}
x.report("upto:") {1.upto(n) do ; _ = "1"; end}
-end
+ end
-benchmark do
- [
- measure{for _ in 1..n; _ = "1"; end}, # Benchmark.measure
- measure{n.times do ; _ = "1"; end},
- measure{1.upto(n) do ; _ = "1"; end}
- ]
+ benchmark do
+ [
+ measure{for _ in 1..n; _ = "1"; end}, # Benchmark.measure
+ measure{n.times do ; _ = "1"; end},
+ measure{1.upto(n) do ; _ = "1"; end}
+ ]
end
end