aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2015-06-02 20:51:16 -0400
committerJack Nagel2015-06-02 20:51:16 -0400
commit9516444dfd0092812b6e7a3d592946ddb042e4eb (patch)
treef1e708e2e7d1f9bf8b18a2dd78eea37aa6186f2e
parent919698fddee8024dd6bd60b23741789b458689a9 (diff)
downloadbrew-9516444dfd0092812b6e7a3d592946ddb042e4eb.tar.bz2
Give namespace modules a name so formula objects can be marshaled
Fixes Homebrew/homebrew#40311.
-rw-r--r--Library/Homebrew/formulary.rb3
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)