mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
benchmark/driver.rb: simplify LoadError handling
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d081b3c62d
commit
c2ae11e308
1 changed files with 2 additions and 9 deletions
|
@ -3,18 +3,11 @@
|
||||||
# Ruby Benchmark driver
|
# Ruby Benchmark driver
|
||||||
#
|
#
|
||||||
|
|
||||||
first = true
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
if first
|
|
||||||
first = false
|
|
||||||
$:.unshift File.join(File.dirname(__FILE__), '../lib')
|
$:.unshift File.join(File.dirname(__FILE__), '../lib')
|
||||||
retry
|
require 'optparse'
|
||||||
else
|
|
||||||
raise
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'benchmark'
|
require 'benchmark'
|
||||||
|
|
Loading…
Reference in a new issue