summaryrefslogtreecommitdiff
path: root/lib/chef/resource_inspector.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-07 09:21:36 -0800
committerTim Smith <tsmith@chef.io>2018-11-07 09:47:58 -0800
commit094e5a12d692220043db6cc5e5760050e601bede (patch)
tree719844689c1e86ccc14763a77ef7b4fd5d753301 /lib/chef/resource_inspector.rb
parent7b5393389fddedb234b62e1d5c3498400bc95fcf (diff)
downloadchef-094e5a12d692220043db6cc5e5760050e601bede.tar.gz
More tweaks to when we quote defaults in resource-inspector
We were quoting a lot of odd things like empty arrays or empty strings. The original intent was to quote symbols. Let's just stick to that. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource_inspector.rb')
-rw-r--r--lib/chef/resource_inspector.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource_inspector.rb b/lib/chef/resource_inspector.rb
index 55a4d8e65d..ac65e55e99 100644
--- a/lib/chef/resource_inspector.rb
+++ b/lib/chef/resource_inspector.rb
@@ -31,7 +31,7 @@ module ResourceInspector
# code for the resource ourselves and just no
"lazy default"
else
- default.inspect unless default.nil? # inspect properly returns symbols
+ default.is_a?(Symbol) ? default.inspect : default # inspect properly returns symbols
end
end