summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 04:12:04 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-08 04:12:04 (GMT)
commitc2ae11e308c4339803d78308959ee4a15af0e659 (patch)
tree2fc36bac7caee02436e0a94e1f47648b73e3ced3 /benchmark
parentd081b3c62dd487cbb0d0b87d99011bd793ec2701 (diff)
benchmark/driver.rb: simplify LoadError handling
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rwxr-xr-xbenchmark/driver.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/benchmark/driver.rb b/benchmark/driver.rb
index 0215d76..c166c80 100755
--- a/benchmark/driver.rb
+++ b/benchmark/driver.rb
@@ -3,18 +3,11 @@
# Ruby Benchmark driver
#
-first = true
-
begin
require 'optparse'
rescue LoadError
- if first
- first = false
- $:.unshift File.join(File.dirname(__FILE__), '../lib')
- retry
- else
- raise
- end
+ $:.unshift File.join(File.dirname(__FILE__), '../lib')
+ require 'optparse'
end
require 'benchmark'