ruby-changes:51670
From: k0kubun <ko1@a...>
Date: Sun, 8 Jul 2018 13:12:09 +0900 (JST)
Subject: [ruby-changes:51670] k0kubun:r63882 (trunk): benchmark/driver.rb: simplify LoadError handling
k0kubun 2018-07-08 13:12:04 +0900 (Sun, 08 Jul 2018) New Revision: 63882 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63882 Log: benchmark/driver.rb: simplify LoadError handling Modified files: trunk/benchmark/driver.rb Index: benchmark/driver.rb =================================================================== --- benchmark/driver.rb (revision 63881) +++ benchmark/driver.rb (revision 63882) @@ -3,18 +3,11 @@ https://github.com/ruby/ruby/blob/trunk/benchmark/driver.rb#L3 # 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' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/