diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2018-01-17 13:34:18 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2018-01-17 13:34:18 -0800 |
commit | 746562d6358c27b838c95ea27b2a2bd82c03cefe (patch) | |
tree | baa587f091d06c1385543bbde818970e5fee7b75 /lib/chef/node | |
parent | fcd8d778baeeb990a64fe9042164bbd3e1dd5269 (diff) | |
download | chef-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.rb | 4 | ||||
-rw-r--r-- | lib/chef/node/immutable_collections.rb | 6 |
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 |