diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-10-05 19:39:32 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-10-05 19:39:32 -0700 |
commit | 60904bb6b11793476cff23903948637ad5e77dd5 (patch) | |
tree | 9f3ce53a6fcdbd8e8836c8cc2e93c44ae3b92aef /lib/chef | |
parent | 17ce85d19122073be1cceb2464c70daf0d63d7cf (diff) | |
download | chef-60904bb6b11793476cff23903948637ad5e77dd5.tar.gz |
Resource collection should no longer reject duplicate resources
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/resource_collection.rb | 3 |
1 files changed, 0 insertions, 3 deletions
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 |