diff --git a/Library/Homebrew/.simplecov b/Library/Homebrew/.simplecov index 792b6951ee..ef7d8b12be 100755 --- a/Library/Homebrew/.simplecov +++ b/Library/Homebrew/.simplecov @@ -72,8 +72,8 @@ SimpleCov.start do require "rbconfig" host_os = RbConfig::CONFIG["host_os"] - add_filter %r{/os/mac} unless /darwin/.match?(host_os) - add_filter %r{/os/linux} unless /linux/.match?(host_os) + add_filter %r{/os/mac} unless host_os.include?("darwin") + add_filter %r{/os/linux} unless host_os.include?("linux") # Add groups and the proper project name to the output. project_name "Homebrew" diff --git a/Library/Homebrew/extend/os/linux/system_config.rb b/Library/Homebrew/extend/os/linux/system_config.rb index bbc79a42fc..d17b5a7516 100644 --- a/Library/Homebrew/extend/os/linux/system_config.rb +++ b/Library/Homebrew/extend/os/linux/system_config.rb @@ -44,8 +44,8 @@ module SystemConfig return unless /-microsoft/i.match?(kernel) return "2 (Microsoft Store)" if Version.new(kernel[/Linux ([0-9.]*)-.*/, 1]) > Version.new("5.15") - return "2" if /-microsoft/.match?(kernel) - return "1" if /-Microsoft/.match?(kernel) + return "2" if kernel.include?("-microsoft") + return "1" if kernel.include?("-Microsoft") end def dump_verbose_config(out = $stdout) diff --git a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb index 322f4de60b..021122eec8 100644 --- a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb +++ b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb @@ -49,7 +49,7 @@ module FormulaCellarChecks python_modules = Pathname.glob lib/"python*/site-packages/**/*.so" framework_links = python_modules.select do |obj| dlls = obj.dynamically_linked_libraries - dlls.any? { |dll| /Python\.framework/.match dll } + dlls.any? { |dll| dll.include?("Python.framework") } end return if framework_links.empty?