summaryrefslogtreecommitdiffstats
path: root/benchmark
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
commit88de9fdb628583b515d16d2066034239f8489feb (patch)
tree74bb1e25ccdf60e81778abd72ec1f2a16db24c60 /benchmark
parentf667a7fc3d4f23444bc0ca7353254bcdb79b5946 (diff)
downloadruby-88de9fdb628583b515d16d2066034239f8489feb.tar.gz
ruby-88de9fdb628583b515d16d2066034239f8489feb.tar.xz
ruby-88de9fdb628583b515d16d2066034239f8489feb.zip
* benchmark/driver.rb: add path to trunk/lib if driver runner is
in build directory. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/driver.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 861d54f90..4a1afe360 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'