aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark/driver.rb
diff options
context:
space:
mode:
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'