1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
naruse 2011-06-12 18:13:06 +00:00
parent f2c7a874a7
commit e445f1c684
2 changed files with 8 additions and 1 deletions

View file

@ -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)