assertions.rb: fallback encoding error
* test/lib/test/unit/assertions.rb (message): fallback when outputs from different encoding commands mixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5e3467c441
commit
80bedec6c2
@ -490,7 +490,11 @@ EOT
|
||||
if 1 < ary.length
|
||||
ary[0...-1] = ary[0...-1].map {|str| str.sub(/(?<!\.)\z/, '.') }
|
||||
end
|
||||
begin
|
||||
ary.join("\n")
|
||||
rescue Encoding::CompatibilityError
|
||||
ary.map(&:b).join("\n")
|
||||
end
|
||||
end
|
||||
else
|
||||
super
|
||||
|
Loading…
x
Reference in New Issue
Block a user