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/cookbook_version.rb | |
parent | 2833651dcf54db5ba8e92746b479ebafa897b275 (diff) | |
download | chef-4978a9a8a402477f3b35f43404701d6a5cf26fa1.tar.gz |
Style/EmptyLiteral
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r-- | lib/chef/cookbook_version.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index e149947603..959318a020 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -96,7 +96,7 @@ class Chef @root_paths = root_paths @frozen = false - @all_files = Array.new + @all_files = [] @file_vendor = nil @cookbook_manifest = Chef::CookbookManifest.new(self) @@ -279,8 +279,8 @@ class Chef def relative_filenames_in_preferred_directory(node, segment, dirname) preferences = preferences_for_path(node, segment, dirname) - filenames_by_pref = Hash.new - preferences.each { |pref| filenames_by_pref[pref] = Array.new } + filenames_by_pref = {} + preferences.each { |pref| filenames_by_pref[pref] = [] } files_for(segment).each do |manifest_record| manifest_record_path = manifest_record[:path] @@ -319,8 +319,8 @@ class Chef # description of entries of the returned Array. def preferred_manifest_records_for_directory(node, segment, dirname) preferences = preferences_for_path(node, segment, dirname) - records_by_pref = Hash.new - preferences.each { |pref| records_by_pref[pref] = Array.new } + records_by_pref = {} + preferences.each { |pref| records_by_pref[pref] = [] } files_for(segment).each do |manifest_record| manifest_record_path = manifest_record[:path] |