method
non_options

v1_9_3_125 -
Show latest stable
-
0 notes -
Class: GlobOption
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
non_options(files, options)
public
Hide source
# File lib/test/unit.rb, line 141 def non_options(files, options) paths = [options.delete(:base_directory), nil].uniq if reject = options.delete(:reject) reject_pat = Regexp.union(reject.map {|r| /#{r}/ }) end files.map! {|f| f = f.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR ((paths if /\A\.\.?(?:\z|\/)/ !~ f) || [nil]).any? do |prefix| if prefix path = f.empty? ? prefix : "#{prefix}/#{f}" else next if f.empty? path = f end if !(match = Dir["#{path}/**/#{@@testfile_prefix}_*.rb"]).empty? if reject match.reject! {|n| n[(prefix.length+1)..-1] if prefix reject_pat =~ n } end break match elsif !reject or reject_pat !~ f and File.exist? path break path end end or raise ArgumentError, "file not found: #{f}" } files.flatten! super(files, options) end