Merge pull request #5597 from cmbernard333/feature/homebrew-cask-json-error

Added missing method to_a to Cask::DSL:ConflictsWith class.
This commit is contained in:
Markus Reiter 2019-01-27 19:03:28 +01:00 committed by GitHub
commit d0202f692f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -133,7 +133,7 @@ module Cask
end,
"caveats" => caveats,
"depends_on" => depends_on,
"conflicts_with" => conflicts_with.to_a,
"conflicts_with" => conflicts_with.to_h,
"container" => container,
"auto_updates" => auto_updates,
}

View File

@ -25,6 +25,10 @@ module Cask
instance_variable_set("@#{key}", instance_variable_get("@#{key}").merge([*value]))
end
end
def to_h
Hash[VALID_KEYS.map { |key| [key, instance_variable_get("@#{key}").to_a] }]
end
end
end
end