summaryrefslogtreecommitdiff
path: root/lib/chef/node.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-03 12:26:05 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-05 12:40:44 -0700
commit4978a9a8a402477f3b35f43404701d6a5cf26fa1 (patch)
tree7f336c1fa29d7bdb50f8a6e0a2e5943fbb32ba51 /lib/chef/node.rb
parent2833651dcf54db5ba8e92746b479ebafa897b275 (diff)
downloadchef-4978a9a8a402477f3b35f43404701d6a5cf26fa1.tar.gz
Style/EmptyLiteral
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/node.rb')
-rw-r--r--lib/chef/node.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/node.rb b/lib/chef/node.rb
index cefd656609..a9c37c92de 100644
--- a/lib/chef/node.rb
+++ b/lib/chef/node.rb
@@ -580,7 +580,7 @@ class Chef
def self.list_by_environment(environment, inflate = false)
if inflate
- response = Hash.new
+ response = {}
Chef::Search::Query.new.search(:node, "chef_environment:#{environment}") { |n| response[n.name] = n unless n.nil? }
response
else
@@ -590,7 +590,7 @@ class Chef
def self.list(inflate = false)
if inflate
- response = Hash.new
+ response = {}
Chef::Search::Query.new.search(:node) do |n|
n = Chef::Node.from_hash(n)
response[n.name] = n unless n.nil?