summaryrefslogtreecommitdiff
path: root/lib/chef/node
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-17 13:34:18 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-01-17 13:34:18 -0800
commit746562d6358c27b838c95ea27b2a2bd82c03cefe (patch)
treebaa587f091d06c1385543bbde818970e5fee7b75 /lib/chef/node
parentfcd8d778baeeb990a64fe9042164bbd3e1dd5269 (diff)
downloadchef-746562d6358c27b838c95ea27b2a2bd82c03cefe.tar.gz
prepping for rubocop 0.52.1lcg/rubocop-0.52.1
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/node')
-rw-r--r--lib/chef/node/attribute_collections.rb4
-rw-r--r--lib/chef/node/immutable_collections.rb6
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/chef/node/attribute_collections.rb b/lib/chef/node/attribute_collections.rb
index bb32ae3b54..6922bcf200 100644
--- a/lib/chef/node/attribute_collections.rb
+++ b/lib/chef/node/attribute_collections.rb
@@ -1,6 +1,6 @@
#--
# Author:: Daniel DeLeo (<dan@chef.io>)
-# Copyright:: Copyright 2012-2017, Chef Software Inc.
+# Copyright:: Copyright 2012-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -175,7 +175,7 @@ class Chef
def []=(key, value)
ret = super
send_reset_cache(__path__)
- ret
+ ret # rubocop:disable Lint/Void
end
alias :attribute? :has_key?
diff --git a/lib/chef/node/immutable_collections.rb b/lib/chef/node/immutable_collections.rb
index 6458db94e9..dc8ead9176 100644
--- a/lib/chef/node/immutable_collections.rb
+++ b/lib/chef/node/immutable_collections.rb
@@ -1,5 +1,5 @@
#--
-# Copyright:: Copyright 2012-2017, Chef Software Inc.
+# Copyright:: Copyright 2012-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -286,8 +286,6 @@ class Chef
super
end
- alias_method :to_hash, :to_h
-
def reset
@generated_cache = false
@short_circuit_attr_level = nil
@@ -315,7 +313,7 @@ class Chef
unless subhash.nil? # FIXME: nil is used for not present
tracked_components << component
if subhash.kind_of?(Hash)
- subhash.keys.each do |key|
+ subhash.each_key do |key|
next if internal_key?(key)
internal_set(key, subhash[key])
end