summaryrefslogtreecommitdiff
path: root/lib/chef/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource.rb')
-rw-r--r--lib/chef/resource.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index cd1743103e..446801e099 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -1531,7 +1531,7 @@ class Chef
# @api private
def self.register_deprecated_lwrp_class(resource_class, class_name)
- if Chef::Resource.const_defined?(class_name, false)
+ if Chef::Resource.const_defined?(class_name)
Chef::Log.warn "#{class_name} already exists! Deprecation class overwrites #{resource_class}"
Chef::Resource.send(:remove_const, class_name)
end
@@ -1542,9 +1542,9 @@ class Chef
end
end
- @@deprecated_constants = {}
+ #@@deprecated_constants = {}
def deprecated_constants
- @deprecated_constants
+ @deprecated_constants ||= {}
end
# @api private