From c47d59a0a736cefc7bbf80232f3175676a528ad1 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 5 May 2014 16:11:00 +0000 Subject: * 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 --- benchmark/driver.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'benchmark') 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}" -- cgit v1.2.3