summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-09-01 14:01:17 -0700
committerJohn Keiser <john@johnkeiser.com>2015-09-01 19:30:56 -0700
commit8379bcbdf656f09dbf62a6dfffed5217bf6a146f (patch)
tree58c8d5f4b4feb1163922af2c10c0676d36ac943d
parent86d422017d0d990ac396ac5109320a8a4bbbe878 (diff)
downloadchef-8379bcbdf656f09dbf62a6dfffed5217bf6a146f.tar.gz
Send a string, not an array
-rw-r--r--lib/chef/log.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/log.rb b/lib/chef/log.rb
index aff6252e12..bf846c2072 100644
--- a/lib/chef/log.rb
+++ b/lib/chef/log.rb
@@ -38,7 +38,10 @@ class Chef
end
def self.deprecation(msg=nil, location=caller(2..2)[0], &block)
- msg << " at #{Array(location).join("\n")}"
+ if msg
+ msg << " at #{Array(location).join("\n")}"
+ msg = msg.join("") if msg.respond_to?(:join)
+ end
if Chef::Config[:treat_deprecation_warnings_as_errors]
error(msg, &block)
raise Chef::Exceptions::DeprecatedFeatureError.new(msg)