summaryrefslogtreecommitdiff
path: root/lib/benchmark.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/benchmark.rb')
-rw-r--r--lib/benchmark.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/benchmark.rb b/lib/benchmark.rb
index 97573d2a13..16c4cb611a 100644
--- a/lib/benchmark.rb
+++ b/lib/benchmark.rb
@@ -577,13 +577,13 @@ module Benchmark
def format(arg0 = nil, *args)
fmtstr = (arg0 || FMTSTR).dup
- fmtstr.gsub!(/(%[\-+\.\d]*)n/){"#{$1}s" % label}
- fmtstr.gsub!(/(%[\-+\.\d]*)u/){"#{$1}f" % utime}
- fmtstr.gsub!(/(%[\-+\.\d]*)y/){"#{$1}f" % stime}
- fmtstr.gsub!(/(%[\-+\.\d]*)U/){"#{$1}f" % cutime}
- fmtstr.gsub!(/(%[\-+\.\d]*)Y/){"#{$1}f" % cstime}
- fmtstr.gsub!(/(%[\-+\.\d]*)t/){"#{$1}f" % total}
- fmtstr.gsub!(/(%[\-+\.\d]*)r/){"(#{$1}f)" % real}
+ fmtstr.gsub!(/(%[-+\.\d]*)n/){"#{$1}s" % label}
+ fmtstr.gsub!(/(%[-+\.\d]*)u/){"#{$1}f" % utime}
+ fmtstr.gsub!(/(%[-+\.\d]*)y/){"#{$1}f" % stime}
+ fmtstr.gsub!(/(%[-+\.\d]*)U/){"#{$1}f" % cutime}
+ fmtstr.gsub!(/(%[-+\.\d]*)Y/){"#{$1}f" % cstime}
+ fmtstr.gsub!(/(%[-+\.\d]*)t/){"#{$1}f" % total}
+ fmtstr.gsub!(/(%[-+\.\d]*)r/){"(#{$1}f)" % real}
arg0 ? Kernel::format(fmtstr, *args) : fmtstr
end