summaryrefslogtreecommitdiffstats
path: root/lib/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-04 18:28:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-04 18:28:49 +0000
commit338a791dd3c59e1613c907d71f821759217e0898 (patch)
treeb44f957e4fd89f7f1bf2a638e6708652b2d5797b /lib/test
parent60ea0155bb3b71c82142da4e2ae89f824f859334 (diff)
downloadruby-338a791dd3c59e1613c907d71f821759217e0898.tar.gz
ruby-338a791dd3c59e1613c907d71f821759217e0898.tar.xz
ruby-338a791dd3c59e1613c907d71f821759217e0898.zip
* lib/test/unit.rb (Test::Unit.setup_argv): expands paths before
requiring. [ruby-dev:39012] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test')
-rw-r--r--lib/test/unit.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 3e2b38827..fd7fe06f4 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