summaryrefslogtreecommitdiff
path: root/lib/chef/node_map.rb
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-06-05 14:47:18 -0700
committerJohn Keiser <john@johnkeiser.com>2015-06-08 09:01:55 -0700
commit3dcaddb86dc85a4cf730e675232ce83f97d5726b (patch)
tree950b87bae166f85b45edf7552dee6891153e8125 /lib/chef/node_map.rb
parentc65de79dbd662d895c8a10ef496d7eb9c69376c2 (diff)
downloadchef-3dcaddb86dc85a4cf730e675232ce83f97d5726b.tar.gz
Make sure resource_name :x only removes automatic provides from that class
Diffstat (limited to 'lib/chef/node_map.rb')
-rw-r--r--lib/chef/node_map.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb
index 18f55da835..9092316c1b 100644
--- a/lib/chef/node_map.rb
+++ b/lib/chef/node_map.rb
@@ -102,10 +102,10 @@ class Chef
# Seriously, don't use this, it's nearly certain to change on you
# @return remaining
# @api private
- def delete_canonical(key)
+ def delete_canonical(key, value)
remaining = @map[key]
if remaining
- remaining.delete_if { |matcher| matcher[:canonical] }
+ remaining.delete_if { |matcher| matcher[:canonical] && Array(matcher[:value]) == Array(value) }
if remaining.empty?
@map.delete(key)
remaining = nil