mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
assertions.rb: AllFailures#message encoding
* test/lib/test/unit/assertions.rb (AllFailures#message): put indented messages back to the original encoding, to get rid of Encoding::CompatibilityError when key has non-ASCII characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4eafec5ea6
commit
ae6625c546
1 changed files with 2 additions and 1 deletions
|
@ -888,7 +888,8 @@ eom
|
|||
total = @count.to_s
|
||||
fmt = "%#{total.size}d"
|
||||
@failures.map {|k, (n, v)|
|
||||
"\n#{i+=1}. [#{fmt%n}/#{total}] Assertion for #{k.inspect}\n#{v.message.b.gsub(/^/, ' | ')}"
|
||||
v = v.message
|
||||
"\n#{i+=1}. [#{fmt%n}/#{total}] Assertion for #{k.inspect}\n#{v.b.gsub(/^/, ' | ').force_encoding(v.encoding)}"
|
||||
}.join("\n")
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue