summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/metadata.rb
diff options
context:
space:
mode:
authorTristan and Brett <tristan+tristanoneil+brettchalupa@gofullstack.com>2014-08-26 15:28:00 -0400
committerTristan O'Neil <tristanoneil@gmail.com>2014-08-26 15:28:00 -0400
commitd36f09a19544ce4329ed8d5d80017d7a28359cd6 (patch)
tree656ec052c23b604898ed3bb3cd30f5fac8e9aced /lib/chef/cookbook/metadata.rb
parentfe6d60f7a9456a97457f37a20729e366a714f428 (diff)
downloadchef-d36f09a19544ce4329ed8d5d80017d7a28359cd6.tar.gz
Ensure metadata responds to method before sending, use public_send
Diffstat (limited to 'lib/chef/cookbook/metadata.rb')
-rw-r--r--lib/chef/cookbook/metadata.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index 431a116ca2..54e930135d 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -542,7 +542,9 @@ class Chef
VERSION_CONSTRAINTS.each do |dependency_type, hash_key|
if dependency_group = o[hash_key]
dependency_group.each do |cb_name, constraints|
- metadata.send(method_name, cb_name, *Array(constraints))
+ if metadata.respond_to?(method_name)
+ metadata.public_send(method_name, cb_name, *Array(constraints))
+ end
end
end
end