Skip to content

Commit

Permalink
On some rubies (e.g. 1.8) anonymous classes are named '', not nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Dec 22, 2012
1 parent 356f15a commit c4f1b20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rspec/core/formatters/base_text_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ def dump_failure_info(example)
end

def exception_class_name_for(exception)
exception.class.name || "(anonymous error class)"
name = exception.class.name.to_s
name ="(anonymous error class)" if name == ''
name
end

def dump_shared_failure_info(group)
Expand Down

0 comments on commit c4f1b20

Please sign in to comment.