Skip to content

Commit ebc7ce2

Browse files
committed
Return the original message in warnings if they're just a string
Due to the `if` we'd return `nil` if the message was not an array.
1 parent cb8cb27 commit ebc7ce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/docurium.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def initialize(warning, type, identifier, opts = {})
288288

289289
def message
290290
msg = self._message
291-
msg.shift % msg.map {|a| self.send(a).to_s } if msg.kind_of?(Array)
291+
msg.kind_of?(Array) ? msg.shift % msg.map {|a| self.send(a).to_s } : msg
292292
end
293293
end
294294

0 commit comments

Comments
 (0)