diff options
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 |
