Skip to content

Commit

Permalink
- Check option[:filter] klass before match. Fixes 2.6 warning. (y-y…
Browse files Browse the repository at this point in the history
…agi)

[git-p4: depot-paths = "//src/minitest/dev/": change = 12123]
  • Loading branch information
zenspider committed Jun 11, 2019
1 parent 24551b6 commit 2a9878b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/minitest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def self.reset # :nodoc:

def self.run reporter, options = {}
filter = options[:filter] || "/./"
filter = Regexp.new $1 if filter =~ %r%/(.*)/%
filter = Regexp.new $1 if filter.is_a?(String) && filter =~ %r%/(.*)/%

filtered_methods = self.runnable_methods.find_all { |m|
filter === m || filter === "#{self}##{m}"
Expand Down

0 comments on commit 2a9878b

Please sign in to comment.