Fix nil error with KNOWNBUGS.rb
Previously, `make test-knownbugs` crashed with `NoMethodError` due to the failed regex match if there is a test case in KNOWNBUGS.rb. The note about 1.8 compatibility is probably bogus as we require a way more recent BASERUBY now.
This commit is contained in:
parent
00cbdb5a8b
commit
478b4ef9de
@ -6,7 +6,6 @@
|
||||
# Never use optparse in this file.
|
||||
# Never use test/unit in this file.
|
||||
# Never use Ruby extensions in this file.
|
||||
# Maintain Ruby 1.8 compatibility for now
|
||||
|
||||
$start_time = Time.now
|
||||
|
||||
@ -428,7 +427,7 @@ class Assertion < Struct.new(:src, :path, :lineno, :proc)
|
||||
def initialize(*args)
|
||||
super
|
||||
self.class.add self
|
||||
@category = self.path.match(/test_(.+)\.rb/)[1]
|
||||
@category = self.path[/\Atest_(.+)\.rb\z/, 1]
|
||||
end
|
||||
|
||||
def call
|
||||
|
Loading…
x
Reference in New Issue
Block a user