1
0
Fork 0
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:
k0kubun 2018-07-08 04:12:04 +00:00
parent d081b3c62d
commit c2ae11e308

View file

@ -3,18 +3,11 @@
# Ruby Benchmark driver # Ruby Benchmark driver
# #
first = true
begin begin
require 'optparse' require 'optparse'
rescue LoadError rescue LoadError
if first $:.unshift File.join(File.dirname(__FILE__), '../lib')
first = false require 'optparse'
$:.unshift File.join(File.dirname(__FILE__), '../lib')
retry
else
raise
end
end end
require 'benchmark' require 'benchmark'