Skip to content

Commit

Permalink
Fix nil error with KNOWNBUGS.rb
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
XrXr committed Apr 8, 2024
1 parent 00cbdb5 commit 478b4ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bootstraptest/runner.rb
Expand Up @@ -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

Expand Down Expand Up @@ -428,7 +427,7 @@ def add as
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
Expand Down

0 comments on commit 478b4ef

Please sign in to comment.