diff --git a/Library/Homebrew/os/mac/version.rb b/Library/Homebrew/os/mac/version.rb index 37681b4d2b..57d0df7e87 100644 --- a/Library/Homebrew/os/mac/version.rb +++ b/Library/Homebrew/os/mac/version.rb @@ -117,6 +117,7 @@ module OS alias requires_popcnt? requires_nehalem_cpu? # Represents the absence of a version. + # NOTE: Constructor needs to called with an arbitrary macOS-like version which is then set to `nil`. NULL = Version.new("10.0").tap { |v| v.instance_variable_set(:@version, nil) }.freeze end end diff --git a/Library/Homebrew/version.rb b/Library/Homebrew/version.rb index a8f6f9fd3b..741a57f5de 100644 --- a/Library/Homebrew/version.rb +++ b/Library/Homebrew/version.rb @@ -736,5 +736,6 @@ class Version end # Represents the absence of a version. + # NOTE: Constructor needs to called with an arbitrary non-empty version which is then set to `nil`. NULL = Version.new("NULL").tap { |v| v.instance_variable_set(:@version, nil) }.freeze end