diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-21 09:03:52 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-11-21 09:03:52 +0000 |
commit | 58b1f91b469fddbe52e280bc044d7c0594bca6d0 (patch) | |
tree | 74bb1e25ccdf60e81778abd72ec1f2a16db24c60 /benchmark | |
parent | a5c44807324afc06cac9975bfccd6579a0c07271 (diff) |
* 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')
-rw-r--r-- | benchmark/driver.rb | 17 |
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' |