зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
da35e7549b
Коммит
c47d59a0a7
|
@ -1,3 +1,8 @@
|
|||
Tue May 6 01:08:01 2014 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* benchmark/driver.rb: define File::NULL if not defiend and /dev/null
|
||||
is available to run benchmark driver on ruby 1.9.2.
|
||||
|
||||
Mon May 5 23:53:24 2014 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/socket/mkconstants.rb: Add IP_TRANSPARENT.
|
||||
|
|
|
@ -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}"
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче