Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

call #to_s on exception_message before calling #split

When 1.8.7 is shutting down its threads, and you're stuck in a Monitor,
it will eventually raise a SystemExit, and that SystemExit may have an
instance of Exception as its `#message` (instead of a String) which
causes the formatter to blow up.
  • Loading branch information...
commit 2d39c466664429bfa0f56f6cd4b1b419df8077bf 1 parent c9b8681
@slyphon slyphon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/rspec/core/formatters/base_text_formatter.rb
View
2  lib/rspec/core/formatters/base_text_formatter.rb
@@ -179,7 +179,7 @@ def dump_failure_info(example)
exception = example.execution_result[:exception]
output.puts "#{long_padding}#{red("Failure/Error:")} #{red(read_failed_line(exception, example).strip)}"
output.puts "#{long_padding}#{red(exception.class.name << ":")}" unless exception.class.name =~ /RSpec/
- exception.message.split("\n").each { |line| output.puts "#{long_padding} #{red(line)}" } if exception.message
+ exception.message.to_s.split("\n").each { |line| output.puts "#{long_padding} #{red(line)}" } if exception.message
if shared_group = find_shared_group(example)
dump_shared_failure_info(shared_group)
end
Please sign in to comment.
Something went wrong with that request. Please try again.