module Minitest::Assertions

def refute_pattern

def refute_pattern
  raise NotImplementedError, "only available in Ruby 3.0+" unless RUBY_VERSION >= "3.0"
  flunk "refute_pattern requires a block to capture errors." unless block_given?
  begin
    yield
    flunk("NoMatchingPatternError expected, but nothing was raised.")
  rescue NoMatchingPatternError
    pass
  end
end