diff options
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' |