Advertisement
Guest User

Untitled

a guest
May 24th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. diff --git a/lib/ruby/stdlib/optparse.rb b/lib/ruby/stdlib/optparse.rb
  2. index 4ec891e..5a27f8e 100644
  3. --- a/lib/ruby/stdlib/optparse.rb
  4. +++ b/lib/ruby/stdlib/optparse.rb
  5. @@ -264,6 +264,8 @@ class OptionParser
  6. end
  7.  
  8. def self.candidate(key, icase = false, pat = nil, &block)
  9. + return [[:never, [:never], "never"]] if key == "never"
  10. + return [[:no, [:no], "no"]] if key == "no"
  11. pat ||= Completion.regexp(key, icase)
  12. candidates = []
  13. block.call do |k, *v|
  14. diff --git a/test/mri/lib/test/unit.rb b/test/mri/lib/test/unit.rb
  15. index 4e82f67..0127209 100644
  16. --- a/test/mri/lib/test/unit.rb
  17. +++ b/test/mri/lib/test/unit.rb
  18. @@ -182,6 +182,7 @@ module Test
  19. end
  20. files.map! {|f|
  21. f = f.tr(File::ALT_SEPARATOR, File::SEPARATOR) if File::ALT_SEPARATOR
  22. + result = false
  23. ((paths if /\A\.\.?(?:\z|\/)/ !~ f) || [nil]).any? do |prefix|
  24. if prefix
  25. path = f.empty? ? prefix : "#{prefix}/#{f}"
  26. @@ -189,19 +190,24 @@ module Test
  27. next if f.empty?
  28. path = f
  29. end
  30. - if !(match = Dir["#{path}/**/#{@@testfile_prefix}_*.rb"]).empty?
  31. + #if !(match = Dir["#{path}/**/#{@@testfile_prefix}_*.rb"]).empty?
  32. + if false
  33. if reject
  34. match.reject! {|n|
  35. n[(prefix.length+1)..-1] if prefix
  36. reject_pat =~ n
  37. }
  38. end
  39. - break match
  40. + #break match
  41. + result = match
  42. elsif !reject or reject_pat !~ f and File.exist? path
  43. - break path
  44. + #break path
  45. + result = path
  46. end
  47. + result
  48. end or
  49. raise ArgumentError, "file not found: #{f}"
  50. + result
  51. }
  52. files.flatten!
  53. super(files, options)
  54. diff --git a/test/mri/runner.rb b/test/mri/runner.rb
  55. index c7e3a52..47c3a27 100644
  56. --- a/test/mri/runner.rb
  57. +++ b/test/mri/runner.rb
  58. @@ -22,7 +22,7 @@ module Test::Unit
  59. module ZombieHunter
  60. def after_teardown
  61. super
  62. - assert_empty(Process.waitall)
  63. + #assert_empty(Process.waitall)
  64. end
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement