ruby-changes:33751
From: ko1 <ko1@a...>
Date: Tue, 6 May 2014 01:11:05 +0900 (JST)
Subject: [ruby-changes:33751] ko1:r45832 (trunk): * benchmark/driver.rb: define File::NULL if not defiend and /dev/null
ko1 2014-05-06 01:11:00 +0900 (Tue, 06 May 2014) New Revision: 45832 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45832 Log: * benchmark/driver.rb: define File::NULL if not defiend and /dev/null is available to run benchmark driver on ruby 1.9.2. Modified files: trunk/ChangeLog trunk/benchmark/driver.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 45831) +++ ChangeLog (revision 45832) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue May 6 01:08:01 2014 Koichi Sasada <ko1@a...> + + * 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@f...> * ext/socket/mkconstants.rb: Add IP_TRANSPARENT. Index: benchmark/driver.rb =================================================================== --- benchmark/driver.rb (revision 45831) +++ benchmark/driver.rb (revision 45832) @@ -238,6 +238,12 @@ class BenchmarkDriver https://github.com/ruby/ruby/blob/trunk/benchmark/driver.rb#L238 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}" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/