diff --git a/lib/xcode/install.rb b/lib/xcode/install.rb index 16e8f16..c54dbb8 100644 --- a/lib/xcode/install.rb +++ b/lib/xcode/install.rb @@ -464,7 +464,8 @@ def prereleases links end - def compare_versions(first, second) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity + def compare_versions(first, second) # Sort by version number numeric_comparation = first.to_f <=> second.to_f return numeric_comparation if numeric_comparation != 0 @@ -490,6 +491,7 @@ def compare_versions(first, second) # rubocop:disable Metrics/CyclomaticComplexi # Sort alphabetically first <=> second end + # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity def hdiutil(*args) io = IO.popen(['hdiutil', *args])