diff options
| author | Jack Nagel | 2015-06-02 20:51:16 -0400 |
|---|---|---|
| committer | Jack Nagel | 2015-06-02 20:51:16 -0400 |
| commit | 9516444dfd0092812b6e7a3d592946ddb042e4eb (patch) | |
| tree | f1e708e2e7d1f9bf8b18a2dd78eea37aa6186f2e /Library/Homebrew | |
| parent | 919698fddee8024dd6bd60b23741789b458689a9 (diff) | |
| download | brew-9516444dfd0092812b6e7a3d592946ddb042e4eb.tar.bz2 | |
Give namespace modules a name so formula objects can be marshaled
Fixes Homebrew/homebrew#40311.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formulary.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index 5e55543d0..b56d190a0 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -1,3 +1,5 @@ +require "digest/md5" + # The Formulary is responsible for creating instances of Formula. # It is not meant to be used directy from formulae. @@ -14,6 +16,7 @@ class Formulary def self.load_formula(name, path) mod = Module.new + const_set("FormulaNamespace#{Digest::MD5.hexdigest(path.to_s)}", mod) mod.module_eval(path.read, path) class_name = class_s(name) |
