summaryrefslogtreecommitdiff
path: root/test/benchmark
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-12 18:13:06 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-12 18:13:06 +0000
commite445f1c6843f6b9bca47084fefd8ef751a70cc98 (patch)
tree9a90b5016f0c41d27fae344664da9aa3880eceef /test/benchmark
parentf2c7a874a76dd113e088496220f2498e6223e721 (diff)
* test/benchmark/test_benchmark.rb (capture_output):
replace '-' as space. On NetBSD, subtract between two Process.times after and before the short process may return negative value like: t0=Process.times; yield; t1=Process.times; p t1.utime-t0.utime git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/benchmark')
-rw-r--r--test/benchmark/test_benchmark.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/benchmark/test_benchmark.rb b/test/benchmark/test_benchmark.rb
index 8e369fd..b34884f 100644
--- a/test/benchmark/test_benchmark.rb
+++ b/test/benchmark/test_benchmark.rb
@@ -36,7 +36,7 @@ describe Benchmark do
end
def capture_output
- capture_io { yield }.first.gsub(/\d\.\d{6}/, '--time--')
+ capture_io { yield }.first.gsub(/[ \-]\d\.\d{6}/, ' --time--')
end
def capture_bench_output(type, *args, &block)