Skip to content
Snippets Groups Projects
Commit 9516444d authored by Jack Nagel's avatar Jack Nagel
Browse files

Give namespace modules a name so formula objects can be marshaled

Fixes Homebrew/homebrew#40311.
parent 919698fd
No related branches found
No related tags found
No related merge requests found
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment