* 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
This commit is contained in:
parent
528574c2e2
commit
93b9f2cc5e
@ -1,3 +1,8 @@
|
|||||||
|
Wed Aug 5 03:28:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/test/unit.rb (Test::Unit.setup_argv): expands paths before
|
||||||
|
requiring. [ruby-dev:39012]
|
||||||
|
|
||||||
Wed Aug 5 01:38:27 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
Wed Aug 5 01:38:27 2009 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* lib/pp.rb (guard_inspect_key): untrust internal hash to prevent
|
* lib/pp.rb (guard_inspect_key): untrust internal hash to prevent
|
||||||
|
@ -32,7 +32,7 @@ module Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
files.map! {|f|
|
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
|
if File.directory? f
|
||||||
Dir["#{f}/**/test_*.rb"]
|
Dir["#{f}/**/test_*.rb"]
|
||||||
elsif File.file? f
|
elsif File.file? f
|
||||||
@ -47,12 +47,12 @@ module Test
|
|||||||
files.reject! {|f| reject_pat =~ f }
|
files.reject! {|f| reject_pat =~ f }
|
||||||
|
|
||||||
files.each {|f|
|
files.each {|f|
|
||||||
d = File.dirname(File.expand_path(f))
|
d = File.dirname(path = File.expand_path(f))
|
||||||
unless $:.include? d
|
unless $:.include? d
|
||||||
$: << d
|
$: << d
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
require f
|
require path
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
puts "#{f}: #{$!}"
|
puts "#{f}: #{$!}"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user