ruby-changes:2502
From: ko1@a...
Date: 21 Nov 2007 18:04:10 +0900
Subject: [ruby-changes:2502] ko1 - Ruby:r13993 (trunk): * benchmark/driver.rb: add path to trunk/lib if driver runner is
ko1 2007-11-21 18:03:52 +0900 (Wed, 21 Nov 2007) New Revision: 13993 Modified files: trunk/ChangeLog trunk/benchmark/driver.rb Log: * benchmark/driver.rb: add path to trunk/lib if driver runner is in build directory. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/benchmark/driver.rb?r1=13993&r2=13992 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13993&r2=13992 Index: ChangeLog =================================================================== --- ChangeLog (revision 13992) +++ ChangeLog (revision 13993) @@ -1,3 +1,8 @@ +Wed Nov 21 18:02:10 2007 Koichi Sasada <ko1@a...> + + * benchmark/driver.rb: add path to trunk/lib if driver runner is + in build directory. + Wed Nov 21 16:39:21 2007 Tanaka Akira <akr@f...> * test/fileutils/fileasserts.rb (assert_equal_timestamp): new assert Index: benchmark/driver.rb =================================================================== --- benchmark/driver.rb (revision 13992) +++ benchmark/driver.rb (revision 13993) @@ -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' -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml