diff options
| author | Misty De Meo | 2016-11-03 16:48:51 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2016-11-10 15:09:36 -0800 | 
| commit | 20bbeb5e9c4cdd5fb5b7cc92b46325d86b543cf8 (patch) | |
| tree | f79848082c10b418a5a16b170a3313410c376cba /Library/Homebrew/compilers.rb | |
| parent | 16529a4de5c24f62574ba0b7dbc033f5323e7afb (diff) | |
| download | brew-20bbeb5e9c4cdd5fb5b7cc92b46325d86b543cf8.tar.bz2 | |
Return compiler versions and builds as Versions
Diffstat (limited to 'Library/Homebrew/compilers.rb')
| -rw-r--r-- | Library/Homebrew/compilers.rb | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/Library/Homebrew/compilers.rb b/Library/Homebrew/compilers.rb index 7503f1d77..b6c87aeca 100644 --- a/Library/Homebrew/compilers.rb +++ b/Library/Homebrew/compilers.rb @@ -14,7 +14,14 @@ end  class CompilerFailure    attr_reader :name -  attr_rw :version + +  def version(val = nil) +    if val +      @version = Version.parse(val.to_s) +    else +      @version +    end +  end    # Allows Apple compiler `fails_with` statements to keep using `build`    # even though `build` and `version` are the same internally @@ -45,7 +52,7 @@ class CompilerFailure    def initialize(name, version, &block)      @name = name -    @version = version +    @version = Version.parse(version.to_s)      instance_eval(&block) if block_given?    end | 
