From 58ef7c20880642c88d06b351f8bbaaa291898e58 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 21 Mar 2003 15:13:23 +0000 Subject: * regex.c (re_compile_pattern): fix previous change. * instruby.rb, ext/extmk.rb, ext/tk/lib/tk.rb, lib/benchmark.rb, lib/cgi.rb, lib/debug.rb, lib/getoptlong.rb, lib/jcode.rb, lib/optparse.rb, lib/time.rb, lib/date/format.rb, lib/irb/ruby-lex.rb: escape `[', `]', `-' in chracter class in regexp to avoid warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/benchmark.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/benchmark.rb') diff --git a/lib/benchmark.rb b/lib/benchmark.rb index 16c4cb611a..97573d2a13 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 -- cgit v1.2.3