Give namespace modules a name so formula objects can be marshaled
Fixes Homebrew/homebrew#40311.
This commit is contained in:
parent
919698fdde
commit
9516444dfd
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user