aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorVlad Shablinsky2016-07-11 16:09:35 +0300
committerXu Cheng2016-07-16 20:39:13 +0800
commit3fb5d70a729472a7d7f2a5d0d7b84248921fb583 (patch)
treeb23f70013abe231fe997f2601ae89814b1f338db /Library/Homebrew/extend
parent454003c4c1ea43f4fd84db96017636fc4c50b318 (diff)
downloadbrew-3fb5d70a729472a7d7f2a5d0d7b84248921fb583.tar.bz2
Unify Version.create usage
Substitue each Version.new and HeadVersion.new with Version.create to unify Version and HeadVersion instantiation among core code. Note that this does not relate to Mac::OS::Version class.
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV/shared.rb2
-rw-r--r--Library/Homebrew/extend/os/mac/diagnostic.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb
index 2debbae58..62aa311ec 100644
--- a/Library/Homebrew/extend/ENV/shared.rb
+++ b/Library/Homebrew/extend/ENV/shared.rb
@@ -325,6 +325,6 @@ module SharedEnvExtension
def gcc_with_cxx11_support?(cc)
version = cc[/^gcc-(\d+(?:\.\d+)?)$/, 1]
- version && Version.new(version) >= Version.new("4.8")
+ version && Version.create(version) >= Version.create("4.8")
end
end
diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb
index 6f64d1f8a..b3c9b03f6 100644
--- a/Library/Homebrew/extend/os/mac/diagnostic.rb
+++ b/Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -287,8 +287,8 @@ module Homebrew
return unless MacOS::XQuartz.version
return if MacOS::XQuartz.provided_by_apple?
- installed_version = Version.new(MacOS::XQuartz.version)
- latest_version = Version.new(MacOS::XQuartz.latest_version)
+ installed_version = Version.create(MacOS::XQuartz.version)
+ latest_version = Version.create(MacOS::XQuartz.latest_version)
return if installed_version >= latest_version
<<-EOS.undent