summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/chef_zero/rest_base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef_zero/rest_base.rb b/lib/chef_zero/rest_base.rb
index 928d2e7..a03f4aa 100644
--- a/lib/chef_zero/rest_base.rb
+++ b/lib/chef_zero/rest_base.rb
@@ -200,7 +200,7 @@ module ChefZero
end
def json_response(response_code, json, request_version=0, response_version=0, opts={pretty: true})
- do_pretty_json = opts[:pretty] && true
+ do_pretty_json = !!opts[:pretty] # make sure we have a proper Boolean.
already_json_response(response_code, FFI_Yajl::Encoder.encode(json, :pretty => do_pretty_json), request_version, response_version)
end