aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/driver.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-21 09:03:52 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-21 09:03:52 +0000
commit58b1f91b469fddbe52e280bc044d7c0594bca6d0 (patch)
tree74bb1e25ccdf60e81778abd72ec1f2a16db24c60 /benchmark/driver.rb
parenta5c44807324afc06cac9975bfccd6579a0c07271 (diff)
downloadruby-58b1f91b469fddbe52e280bc044d7c0594bca6d0.tar.gz
* benchmark/driver.rb: add path to trunk/lib if driver runner is
in build directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark/driver.rb')
-rw-r--r--benchmark/driver.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 861d54f904..4a1afe360b 100644
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -2,7 +2,22 @@
# Ruby Benchmark driver
#
-require 'optparse'
+first = true
+
+p RUBY_VERSION
+
+begin
+ require 'optparse'
+rescue LoadError
+ if first
+ first = false
+ $:.unshift File.join(File.dirname(__FILE__), '../lib')
+ retry
+ else
+ raise
+ end
+end
+
require 'benchmark'
require 'pp'