diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-05 16:11:00 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-05 16:11:00 +0000 |
commit | c47d59a0a736cefc7bbf80232f3175676a528ad1 (patch) | |
tree | ab6e17c6d5518ebcfcd6aa75075ac6d66f2c3060 /benchmark | |
parent | da35e7549bd250470102e51838c0a7c396392672 (diff) | |
download | ruby-c47d59a0a736cefc7bbf80232f3175676a528ad1.tar.gz |
* benchmark/driver.rb: define File::NULL if not defiend and /dev/null
is available to run benchmark driver on ruby 1.9.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/driver.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb index cbc72cf604..a8b524d926 100644 --- a/benchmark/driver.rb +++ b/benchmark/driver.rb @@ -238,6 +238,12 @@ class BenchmarkDriver result end + unless defined?(File::NULL) + if File.exist?('/dev/null') + File::NULL = '/dev/null' + end + end + def measure executable, file cmd = "#{executable} #{@ruby_arg} #{file}" |