diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-03 12:26:05 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2019-07-05 12:40:44 -0700 |
commit | 4978a9a8a402477f3b35f43404701d6a5cf26fa1 (patch) | |
tree | 7f336c1fa29d7bdb50f8a6e0a2e5943fbb32ba51 /lib/chef/mixin | |
parent | 2833651dcf54db5ba8e92746b479ebafa897b275 (diff) | |
download | chef-4978a9a8a402477f3b35f43404701d6a5cf26fa1.tar.gz |
Style/EmptyLiteral
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r-- | lib/chef/mixin/api_version_request_handling.rb | 2 | ||||
-rw-r--r-- | lib/chef/mixin/windows_architecture_helper.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/mixin/api_version_request_handling.rb b/lib/chef/mixin/api_version_request_handling.rb index a4e657ac9e..c2f7a3203f 100644 --- a/lib/chef/mixin/api_version_request_handling.rb +++ b/lib/chef/mixin/api_version_request_handling.rb @@ -35,7 +35,7 @@ class Chef return nil if exception.response.code != "406" || exception.response["x-ops-server-api-version"].nil? # intersection of versions the server and client support, will be of length zero if no intersection - server_supported_client_versions = Array.new + server_supported_client_versions = [] header = Chef::JSONCompat.from_json(exception.response["x-ops-server-api-version"]) min_server_version = Integer(header["min_version"]) diff --git a/lib/chef/mixin/windows_architecture_helper.rb b/lib/chef/mixin/windows_architecture_helper.rb index 96e1b8d34e..ec7f675825 100644 --- a/lib/chef/mixin/windows_architecture_helper.rb +++ b/lib/chef/mixin/windows_architecture_helper.rb @@ -49,8 +49,8 @@ class Chef node ||= begin os_arch = ENV["PROCESSOR_ARCHITEW6432"] || ENV["PROCESSOR_ARCHITECTURE"] - Hash.new.tap do |n| - n[:kernel] = Hash.new + {}.tap do |n| + n[:kernel] = {} n[:kernel][:machine] = os_arch == "AMD64" ? :x86_64 : :i386 end end |