From 3dcaddb86dc85a4cf730e675232ce83f97d5726b Mon Sep 17 00:00:00 2001 From: John Keiser Date: Fri, 5 Jun 2015 14:47:18 -0700 Subject: Make sure resource_name :x only removes automatic provides from that class --- lib/chef/node_map.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/chef/node_map.rb') 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 -- cgit v1.2.1