Skip to content
This repository
Browse code

On some rubies (e.g. 1.8) anonymous classes are named '', not nil.

  • Loading branch information...
commit c4f1b201b4a16765046f7b7750f8999f63f01ca8 1 parent 356f15a
Myron Marston myronmarston authored

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 1 lib/rspec/core/formatters/base_text_formatter.rb
4 lib/rspec/core/formatters/base_text_formatter.rb
@@ -210,7 +210,9 @@ def dump_failure_info(example)
210 210 end
211 211
212 212 def exception_class_name_for(exception)
213   - exception.class.name || "(anonymous error class)"
  213 + name = exception.class.name.to_s
  214 + name ="(anonymous error class)" if name == ''
  215 + name
214 216 end
215 217
216 218 def dump_shared_failure_info(group)

0 comments on commit c4f1b20

Please sign in to comment.
Something went wrong with that request. Please try again.