From 266a944bb5dbe189eb284ce786133717a4a2113d Mon Sep 17 00:00:00 2001 From: Seeker Date: Tue, 11 Aug 2020 13:01:10 -0700 Subject: [PATCH] version/null: add major, minor, patch methods --- Library/Homebrew/version/null.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Library/Homebrew/version/null.rb b/Library/Homebrew/version/null.rb index 075c148087..b15546a6cb 100644 --- a/Library/Homebrew/version/null.rb +++ b/Library/Homebrew/version/null.rb @@ -37,6 +37,26 @@ class Version alias_method :requires_sse42?, :requires_nehalem_cpu? alias_method :requires_popcnt?, :requires_nehalem_cpu? + def major + NULL_TOKEN + end + + def minor + NULL_TOKEN + end + + def patch + NULL_TOKEN + end + + def major_minor + self + end + + def major_minor_patch + self + end + def to_f Float::NAN end