aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-05 16:11:00 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-05 16:11:00 +0000
commitc47d59a0a736cefc7bbf80232f3175676a528ad1 (patch)
treeab6e17c6d5518ebcfcd6aa75075ac6d66f2c3060 /benchmark
parentda35e7549bd250470102e51838c0a7c396392672 (diff)
downloadruby-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.rb6
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}"