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.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb
index 565313e3e1..d5a1876943 100644
--- a/lib/chef/resource.rb
+++ b/lib/chef/resource.rb
@@ -1129,13 +1129,12 @@ class Chef
# @deprecated Chef::Resource::FooBar will no longer mean anything special in
# Chef 13. Use `resource_for_node` instead.
def self.resource_matching_short_name(short_name)
- require 'chef/resource_resolver'
begin
rname = convert_to_class_name(short_name.to_s)
result = Chef::Resource.const_get(rname)
- if result.is_a?(Chef::Resource)
- Chef::Log.deprecation("Class Chef::Resource::#{rname} does not declare `provides #{short_name.inspect}`.")
- Chef::Log.deprecation("This will no longer work in Chef 13: you must use `provides` to provide DSL.")
+ if result <= Chef::Resource
+ Chef::Log.deprecation("Class Chef::Resource::#{rname} does not declare 'provides #{short_name.inspect}'.")
+ Chef::Log.deprecation("This will no longer work in Chef 13: you must use 'provides' to provide DSL.")
result
end
rescue NameError