summaryrefslogtreecommitdiff
path: root/lib/chef/dsl
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 14:55:20 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-07-02 15:08:43 -0700
commit21189d25a9385aa9ff3368716824b8333475a08b (patch)
treed4316d70ff88b5a43ffff90d04bd789da51cf9d4 /lib/chef/dsl
parentfb6c052ae6d58db2499cf04ef0595d1e06a4c13c (diff)
downloadchef-21189d25a9385aa9ff3368716824b8333475a08b.tar.gz
fix Style/PreferredHashMethods
absolutely hard requirement on the fixes that went into chef-config 2.2.11, so the floor of that gem is bumped up. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/dsl')
-rw-r--r--lib/chef/dsl/audit.rb2
-rw-r--r--lib/chef/dsl/definitions.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/dsl/audit.rb b/lib/chef/dsl/audit.rb
index 9ef798df91..927523e976 100644
--- a/lib/chef/dsl/audit.rb
+++ b/lib/chef/dsl/audit.rb
@@ -30,7 +30,7 @@ class Chef
name = args[0]
if name.nil? || name.empty?
raise Chef::Exceptions::AuditNameMissing
- elsif run_context.audits.has_key?(name)
+ elsif run_context.audits.key?(name)
raise Chef::Exceptions::AuditControlGroupDuplicate.new(name)
end
diff --git a/lib/chef/dsl/definitions.rb b/lib/chef/dsl/definitions.rb
index 60b1cf6f61..00f6d91739 100644
--- a/lib/chef/dsl/definitions.rb
+++ b/lib/chef/dsl/definitions.rb
@@ -18,7 +18,7 @@ class Chef
# @api private
def has_resource_definition?(name)
- run_context.definitions.has_key?(name)
+ run_context.definitions.key?(name)
end
# Processes the arguments and block as a resource definition.