Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit e6ff352

Browse files
committed
Be more clear about what we do when the description is nil
1 parent caacdca commit e6ff352

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rspec/core/formatters/exception_presenter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ def formatted_message_and_backtrace(colorizer)
245245
end
246246

247247
def encoded_description(description)
248-
encoded_string(description) if description
248+
return if description.nil?
249+
encoded_string(description)
249250
end
250251

251252
def exception_backtrace

0 commit comments

Comments
 (0)