From 60904bb6b11793476cff23903948637ad5e77dd5 Mon Sep 17 00:00:00 2001 From: Adam Jacob Date: Sun, 5 Oct 2008 19:39:32 -0700 Subject: Resource collection should no longer reject duplicate resources --- lib/chef/resource_collection.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'lib/chef/resource_collection.rb') diff --git a/lib/chef/resource_collection.rb b/lib/chef/resource_collection.rb index 874ea64378..5278b15c72 100644 --- a/lib/chef/resource_collection.rb +++ b/lib/chef/resource_collection.rb @@ -31,7 +31,6 @@ class Chef def []=(index, arg) is_chef_resource(arg) - raise ArgumentError, "Already have a resource named #{arg.to_s}" if @resources_by_name.has_key?(arg.to_s) @resources[index] = arg @resources_by_name[arg.to_s] = index end @@ -39,7 +38,6 @@ class Chef def <<(*args) args.flatten.each do |a| is_chef_resource(a) - raise ArgumentError, "Already have a resource named #{a.to_s}" if @resources_by_name.has_key?(a.to_s) @resources << a @resources_by_name[a.to_s] = @resources.length - 1 end @@ -48,7 +46,6 @@ class Chef def push(*args) args.flatten.each do |a| is_chef_resource(a) - raise ArgumentError, "Already have a resource named #{a.to_s}" if @resources_by_name.has_key?(a.to_s) @resources.push(a) @resources_by_name[a.to_s] = @resources.length - 1 end -- cgit v1.2.1