diff options
| author | Jack Nagel | 2014-04-06 18:39:29 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-06 18:41:27 -0500 |
| commit | 24c9f4586bb6d9eb0d7c838efb5cf31aae8c4f59 (patch) | |
| tree | 292e299315a8e7efdba45c81149ba2e3f5c7a062 /Library | |
| parent | 231b4f25de8ec527d406347f40c8b641879b3d43 (diff) | |
| download | homebrew-24c9f4586bb6d9eb0d7c838efb5cf31aae8c4f59.tar.bz2 | |
Initialize cxxstdlib set lazily
This is used rarely and only at build-time, so we don't need to create
it when instantiating the formula.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 398f14413..49271b76d 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -26,10 +26,6 @@ class Formula attr_accessor :local_bottle_path - # Flag for marking whether this formula needs C++ standard library - # compatibility check - attr_reader :cxxstdlib - # Homebrew determines the name def initialize name='__UNKNOWN__', path=self.class.path(name) @name = name @@ -47,8 +43,6 @@ class Formula @pkg_version = PkgVersion.new(version, revision) @pin = FormulaPin.new(self) - - @cxxstdlib = Set.new end def set_spec(name) @@ -445,6 +439,12 @@ class Formula Requirement.expand(self, &block) end + # Flag for marking whether this formula needs C++ standard library + # compatibility check + def cxxstdlib + @cxxstdlib ||= Set.new + end + def to_hash hsh = { "name" => name, |
