From 4978a9a8a402477f3b35f43404701d6a5cf26fa1 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Wed, 3 Jul 2019 12:26:05 -0700 Subject: Style/EmptyLiteral Signed-off-by: Lamont Granquist --- lib/chef/resource.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/chef/resource.rb') diff --git a/lib/chef/resource.rb b/lib/chef/resource.rb index d5f830063f..eea44e5c69 100644 --- a/lib/chef/resource.rb +++ b/lib/chef/resource.rb @@ -121,7 +121,7 @@ class Chef end @before = nil - @params = Hash.new + @params = {} @provider = nil @allowed_actions = self.class.allowed_actions.to_a @action = self.class.default_action @@ -676,7 +676,7 @@ class Chef # json is encoded as expected def as_json(*a) safe_ivars = instance_variables.map { |ivar| ivar.to_sym } - FORBIDDEN_IVARS - instance_vars = Hash.new + instance_vars = {} safe_ivars.each do |iv| instance_vars[iv.to_s.sub(/^@/, "")] = instance_variable_get(iv) end -- cgit v1.2.1