From 93b9f2cc5ef029d4cdeab7637fd419580af57d79 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 4 Aug 2009 18:28:49 +0000 Subject: * lib/test/unit.rb (Test::Unit.setup_argv): expands paths before requiring. [ruby-dev:39012] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/test/unit.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/test') diff --git a/lib/test/unit.rb b/lib/test/unit.rb index 3e2b388273..fd7fe06f43 100644 --- a/lib/test/unit.rb +++ b/lib/test/unit.rb @@ -32,7 +32,7 @@ module Test end files.map! {|f| - f = f.gsub(Regexp.compile(Regexp.quote(File::ALT_SEPARATOR)), File::SEPARATOR) if File::ALT_SEPARATOR + f = f.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR if File.directory? f Dir["#{f}/**/test_*.rb"] elsif File.file? f @@ -47,12 +47,12 @@ module Test files.reject! {|f| reject_pat =~ f } files.each {|f| - d = File.dirname(File.expand_path(f)) + d = File.dirname(path = File.expand_path(f)) unless $:.include? d $: << d end begin - require f + require path rescue LoadError puts "#{f}: #{$!}" end -- cgit v1.2.3